Differential Evolution (Storn & Price 1997) is a population-based evolutionary algorithm that mutates trial vectors using scaled differences of population members. HumpDay's
DifferentialEvolution matches scipy's defaults: the best/1/bin mutation strategy, dither F drawn per-generation in [0.5, 1.0], recombination probability CR = 0.7, and an L-BFGS-B polish from the best DE point at the end. The polish is what closes the residual gap to scipy on Rosenbrock at modest budgets.
HumpDay's DE at a glance
- Budget split: 50% DE exploration, 50% L-BFGS-B polish. Tuned to match scipy.differential_evolution on Rosenbrock.
- Mutation:
best/1/bin— base point is the current population best, perturbed by F·(donor1 − donor2). - Dither F: sampled uniformly per generation from
[0.5, 1.0](scipy'smutation=(0.5, 1)default). - Crossover: binomial with
CR = 0.7and one guaranteed coordinate. - Population:
pop_size = max(10, min(20, de_budget // 5)).
Interactive 3D Visualization
See Differential Evolution in action on 3D optimization surfaces:
Loading 3D visualization...
Requires WebGL support
Instructions: Choose a test function and algorithm, then click Start to watch the step-by-step optimization process.
Implementation Details
| Component | Details | Links |
|---|---|---|
| Original Algorithm |
Rainer Storn & Kenneth Price Evolutionary algorithm using vector differences Population-based with mutation, crossover, and selection Published: 1997 |
Paper |
| Reference Implementation |
scipy.optimize.differential_evolution Reference scipy implementation with polish=True (L-BFGS-B finishing step).Package: scipy |
SciPy Docs Source |
| HumpDay Python |
HumpDay DifferentialEvolutionbest/1/bin mutation, dither F ∈ [0.5, 1.0], CR = 0.7, then L-BFGS-B polish from the best DE point.Pure Python; no required dependencies. File: humpday/optimizers/evolutionary_algorithms.py
|
Source |
| HumpDay JavaScript |
Browser DifferentialEvolutionMirrors the Python port: best/1/bin + dither F + L-BFGS-B polish.Class: DifferentialEvolution
|
JS Port |
Performance characteristics
- Best for: Global optimization on multimodal continuous objectives. The combination of population exploration and L-BFGS-B polish is one of the most reliable defaults in HumpDay.
- Worst for: Tiny budgets where DE can't form a useful population — in those regimes prefer NelderMead or PRIMA.
- Per generation:
pop_sizetrial vectors are proposed and evaluated. - Relative to scipy.differential_evolution at
n_trials=200, n_dim=2: HumpDay wins on sphere by a wide margin and on Ackley; a small gap on Rosenbrock (scipy's L-BFGS-B polish is unbudgeted). See SOTA status for the live numbers.
Educational Resources
Algorithm Overview
Differential Evolution uses a simple yet powerful strategy:
- Population: Maintains multiple candidate solutions
- Mutation: Creates trial vectors using differences between population members
- Crossover: Combines target and trial vectors
- Selection: Keeps the better of target vs. trial
Classic DE/rand/1/bin strategy:
Trial = X_a + F × (X_b - X_c)
Where X_a, X_b, X_c are random population members and F is the scaling factor.