Differential Evolution


Implementation of Differential Evolution: DE/selection/n/recombination

The constructor takes following keyword arguments:

  • populationSize: The size of the population
  • F: the differentiation (mutation) scale factor (default: 0.9). It's usually defined in range $F \in (0, 1+]$
  • n: the number of differences used in the perturbation (default: 1)
  • selection: the selection strategy function (default: random)
  • recombination: the recombination functions (default: BINX(0.5))
  • K: the recombination scale factor (default: 0.5*(F+1))
  • metrics is a collection of convergence metrics.


The Differential Evolution is used for multidimensional real-valued functions but does not use the gradient of the problem being optimized, which means DE does not require the optimization problem to be differentiable, as is required by classic optimization methods such as gradient descent and quasi-newton methods. DE can therefore also be used on optimization problems that are not even continuous, are noisy, change over time, etc [1].


  • 1K. V. Price and R. M. Storn and J. A. Lampinen, "Differential evolution: A practical approach to global optimization", Springer, 2005.