Computing Library › Optimization
Optimization

Differential Evolution

A population-based method that mutates candidates using scaled differences between other population members, effective for continuous global search.

Difference-based mutation

Differential evolution (DE) is a population method for continuous optimization whose distinctive operator builds new candidates from the differences between existing ones. For a target vector, it creates a mutant by adding a scaled difference of two other members to a third: v = x_a + F*(x_b - x_c). This adapts the mutation scale automatically to the population's current spread.

Crossover and selection

Why the difference vector helps

Early on, when the population is spread out, difference vectors are large and the search explores broadly. As the population converges, the differences shrink and the search naturally refines. This self-scaling behavior means DE needs little manual tuning of step sizes, unlike methods with a fixed mutation magnitude.

Strengths

DE is simple, robust, and often outperforms other metaheuristics on continuous benchmarks. It handles nonlinear, nondifferentiable, multimodal objectives, has only a few control parameters (F, CR, population size), and parallelizes easily since each trial evaluation is independent.

Variants and use

Naming like DE/rand/1/bin describes the base vector choice, number of difference vectors, and crossover type. Adaptive variants (jDE, SHADE) adjust F and CR during the run for better robustness. DE is a common choice for calibrating simulation models and tuning continuous design parameters against expensive black-box objectives.

python
for i in range(N):
    a,b,c = pick_three_others(pop, i)
    donor = a + F*(b - c)
    trial = crossover(pop[i], donor, CR)
    if f(trial) <= f(pop[i]): newpop[i] = trial

Differential evolution is a robust default for continuous black-box calibration of physics and engineering models.