Differential evolution (DE) is a population-based evolutionary search method for optimizing vector-valued candidates. Rather than producing offspring, it keeps long-running agents and proposes replacements by adding a scaled difference between two randomly selected agents to a third. A proposal replaces its target only when its fitness is better. section 4.5.1 section 5.6.1
For each target agent, select agents a, b, and c; form a candidate component as a + F(b − c); evaluate it; and retain it if it improves fitness. A crossover rate controls which components are changed, while the scale factor F controls the difference contribution. This component-wise update makes DE useful for continuous, discontinuous, and difficult function approximation. section 4.5.1 section 5.6.1
The workflow visualizes the three-agent differential proposal and fitness-based replacement that drive a DE generation. section 4.5.1
A practical DE loop in DEAP uses:
- A fixed-size population of equal-length numeric vectors, with three agents selected at random for every target agent. section 4.5.1 section 5.6.1
- Hyperparameters for dimensionality, crossover rate, scaling factor, population size, generations, and optional time limit. section 4.5.1
- A fitness evaluation followed by greedy replacement: keep the proposed vector only when it is fitter than its target. section 4.5.1
Function approximation and hyperparameter search
DEAP notebooks apply DE to polynomial, absolute-value, and step-function approximation, then reuse the same differential update to optimize four model hyperparameters. DE is presented as especially useful on discontinuous functions, where evolutionary strategies may be constrained by gradual global approximation; results still depend on the problem and settings. section 4.5.1 section 4.5.2 section 5.6.1
DE can also optimize neural-network weights, but it is not automatically the best choice: on the showcased circles and moons datasets, a simpler genetic algorithm generally performs best and DE is less optimal. Compare methods and tune their parameters rather than assuming a universal winner. section 6.3 section 6.3.1

