๐ŸŒ
Pablormier
pablormier.github.io โ€บ 2017 โ€บ 09 โ€บ 05 โ€บ a-tutorial-on-differential-evolution-with-python
A tutorial on Differential Evolution with Python | Pablo Rodriguez-Mier
September 5, 2017 - Differential Evolution (DE) is a very simple but powerful algorithm for optimization of complex functions that works pretty well in those problems where other techniques (such as Gradient Descent) cannot be used.
method of mathematical optimization
Differential evolution - Wikipedia
Differential evolution (DE) is an evolutionary algorithm to optimize a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality. Such methods are commonly known โ€ฆ Wikipedia
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ Differential_evolution
Differential evolution - Wikipedia
February 9, 2025 - Differential evolution (DE) is an evolutionary algorithm to optimize a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality. Such methods are commonly known as metaheuristics as they make few or no assumptions about the optimized problem and ...
๐ŸŒ
Springer
link.springer.com โ€บ home โ€บ textbook
Differential Evolution: A Practical Approach to Global Optimization | Springer Nature Link
Differential Evolution (eBook)
The differential evolution (DE) algorithm is a practical approach to global numerical optimization which is easy to understand, simple to implement, reliable, and fast. Packed with illustrations, computer code, new insights, and practical advice, ...
Price ย  โ‚ฌ12.99
Authors ย  Kenneth V. PriceRainer M. Stornโ€ฆ
Pages ย  19
๐ŸŒ
SciPy
docs.scipy.org โ€บ doc โ€บ scipy โ€บ reference โ€บ generated โ€บ scipy.optimize.differential_evolution.html
differential_evolution โ€” SciPy v1.17.0 Manual
Differential evolution is a stochastic population based method that is useful for global optimization problems. At each pass through the population the algorithm mutates each candidate solution by mixing with other candidate solutions to create a trial candidate.
Top answer
1 of 3
16

Here's a simplified description. DE is an optimisation technique which iteratively modifies a population of candidate solutions to make it converge to an optimum of your function.

You first initialise your candidate solutions randomly. Then at each iteration and for each candidate solution x you do the following:

  1. you produce a trial vector: v = a + ( b - c ) / 2, where a, b, c are three distinct candidate solutions picked randomly among your population.
  2. you randomly swap vector components between x and v to produce v'. At least one component from v must be swapped.
  3. you replace x in your population with v' only if it is a better candidate (i.e. it better optimise your function).

(Note that the above algorithm is very simplified; don't code from it, find proper spec. elsewhere instead)

Unfortunately the Wikipedia article lacks illustrations. It is easier to understand with a graphical representation, you'll find some in these slides: http://www-personal.une.edu.au/~jvanderw/DE_1.pdf .

It is similar to genetic algorithm (GA) except that the candidate solutions are not considered as binary strings (chromosome) but (usually) as real vectors. One key aspect of DE is that the mutation step size (see step 1 for the mutation) is dynamic, that is, it adapts to the configuration of your population and will tend to zero when it converges. This makes DE less vulnerable to genetic drift than GA.

2 of 3
13

Answering my own question...

Overview

  • The principal difference between Genetic Algorithms and Differential Evolution (DE) is that Genetic Algorithms rely on crossover while evolutionary strategies use mutation as the primary search mechanism.
  • DE generates new candidates by adding a weighted difference between two population members to a third member (more on this below).
  • If the resulting candidate is superior to the candidate with which it was compared, it replaces it; otherwise, the original candidate remains unchanged.

Definitions

  • The population is made up of NP candidates.
  • Xi = A parent candidate at index i (indexes range from 0 to NP-1) from the current generation. Also known as the target vector.
  • Each candidate contains D parameters.
  • Xi(j) = The jth parameter in candidate Xi.
  • Xa, Xb, Xc = three random parent candidates.
  • Difference vector = (Xb - Xa)
  • F = A weight that determines the rate of the population's evolution.
    • Ideal values: [0.5, 1.0]
  • CR = The probability of crossover taking place.
    • Range: [0, 1]
  • Xc` = A mutant vector obtained through the differential mutation operation. Also known as the donor vector.
  • Xt = The child of Xi and Xc`. Also known as the trial vector.

Algorithm

  1. For each candidate in the population
    • for (int i = 0; i<NP; ++i)
  2. Choose three distinct parents at random (they must differ from each other and i)
do
{
  a = random.nextInt(NP);
} while (a == i)
do
{
  b = random.nextInt(NP);
} while (b == i || b == a);
do
{
  c = random.nextInt(NP);
} while (c == i || c == b || c == a);
  1. (Mutation step) Add a weighted difference vector between two population members to a third member
    • Xc` = Xc + F * (Xb - Xa)
  2. (Crossover step) For every variable in Xi, apply uniform crossover with probability CR to inherit from Xc`; otherwise, inherit from Xi. At least one variable must be inherited from Xc`
int R = random.nextInt(D);
for (int j=0; j < D; ++j)
{
  double probability = random.nextDouble();
  if (probability < CR || j == R)
    Xt[j] = Xc`[j]
  else
    Xt[j] = Xi[j]
}
  1. (Selection step) If Xt is superior to Xi then Xt replaces Xi in the next generation. Otherwise, Xi is kept unmodified.

Resources

  • See this for an overview of the terminology
  • See Optimization Using Differential Evolution by Vasan Arunachalam for an explanation of the Differential Evolution algorithm
  • See Evolution: A Survey of the State-of-the-Art by Swagatam Das and Ponnuthurai Nagaratnam Suganthan for different variants of the Differential Evolution algorithm
  • See Differential Evolution Optimization from Scratch with Python for a detailed description of an implementation of a DE algorithm in python.
๐ŸŒ
ScienceDirect
sciencedirect.com โ€บ topics โ€บ computer-science โ€บ differential-evolution-algorithm
differential evolution algorithm - an overview | ScienceDirect Topics
A differential evolution algorithm is defined as a type of evolutionary algorithm that involves population-based procedures such as mutation, crossover, and selection, with a focus on generating mutant and trial vectors for optimization problems.
๐ŸŒ
Medium
medium.com โ€บ @reshma_shaji โ€บ differential-evolution-what-it-is-and-how-does-it-work-81d3415c2367
Differential evolution | What it is | How it works | Medium
August 22, 2021 - Differential evolution is an evolutionary algorithm for solving global optimization problems by iteratively improving a candidate solution based on an evolutionary process.
๐ŸŒ
ScienceDirect
sciencedirect.com โ€บ science โ€บ article โ€บ pii โ€บ S111001682100613X
Differential evolution: A recent review based on state-of-the-art works - ScienceDirect
September 23, 2021 - Differential evolution (DE) is a popular evolutionary algorithm inspired by Darwinโ€™s theory of evolution and has been studied extensively to solve difโ€ฆ
Find elsewhere
๐ŸŒ
Nature
nature.com โ€บ scientific reports โ€บ articles โ€บ article
A novel multi-hybrid differential evolution algorithm for optimization of frame structures | Scientific Reports
February 28, 2024 - Differential evolution (DE) is a robust optimizer designed for solving complex domain research problems in the computational intelligence community. In the present work, a multi-hybrid DE (MHDE) is proposed for improving the overall working ...
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ algorithms โ€บ differential evolution algorithm
Differential Evolution Algorithm | Baeldung on Computer Science
June 20, 2024 - Differential Evolution comprises three key components that collectively contribute to its effectiveness in solving complex optimization problems. The first step in DE is getting things going. We start by creating a bunch of possible solutions randomly. Each solution is like a guess at the answer to the problem weโ€™re trying to solve. ... algorithm InitializePopulation(populationSize, solutionDimension): // INPUT // populationSize = the size of the initial population // solutionDimension = the dimension of the solution space // OUTPUT // the initial population population <- an empty set // Create individuals for the population for i in [1, ..., population_size + 1]: individual <- generate a random solution population[i] <- individual return population
๐ŸŒ
MachineLearningMastery
machinelearningmastery.com โ€บ home โ€บ blog โ€บ differential evolution from scratch in python
Differential Evolution from Scratch in Python - MachineLearningMastery.com
October 12, 2021 - Differential evolution is a heuristic approach for the global optimisation of nonlinear and non- differentiable continuous space functions. The differential evolution algorithm belongs to a broader family of evolutionary computing algorithms.
๐ŸŒ
PubMed
pubmed.ncbi.nlm.nih.gov โ€บ 23240004
Application of differential evolution algorithm on self-potential data - PubMed
Differential evolution (DE) is a population based evolutionary algorithm widely used for solving multidimensional global optimization problems over continuous spaces, and has been successfully used to solve several kinds of problems.
๐ŸŒ
PyMoo
pymoo.org โ€บ algorithms โ€บ soo โ€บ de.html
DE: Differential Evolution โ€” pymoo: Multi-objective Optimization in Python 0.6.1.6 documentation
Differential Evolution (DE) is a genetic algorithm that uses the differentials between individuals to create the offspring population. Through the usage of differential, the recombination is rotation-invariant and self-adaptive.
๐ŸŒ
PLOS
journals.plos.org โ€บ plosone โ€บ article
A novel differential evolution algorithm with multi-population and elites regeneration | PLOS One
April 25, 2024 - Differential Evolution (DE) is a powerful search method proposed by Storn and Price [1,2]. This simple yet efficient algorithm has been widely applied and has shown remarkable effectiveness in solving optimization problems across various fields ...
๐ŸŒ
PubMed Central
pmc.ncbi.nlm.nih.gov โ€บ articles โ€บ PMC7088454
Using Differential Evolution to Design Optimal Experiments - PMC
Differential Evolution (DE) has become one of the leading metaheuristics in the class of Evolutionary Algorithms, which consists of methods that operate off of survival-of-the-fittest principles. This general purpose optimization algorithm is viewed as an improvement over Genetic Algorithms, ...
๐ŸŒ
Frontiers
frontiersin.org โ€บ articles โ€บ 10.3389 โ€บ fbuil.2020.00102 โ€บ full
Frontiers | A Comparative Study of Differential Evolution Variants in Constrained Structural Optimization
July 9, 2020 - Differential evolution (DE) is a population-based metaheuristic search algorithm that optimizes a problem by iteratively improving a candidate solution based on an evolutionary process.
๐ŸŒ
MDPI
mdpi.com โ€บ 2076-3417 โ€บ 8 โ€บ 10 โ€บ 1945
Differential Evolution: A Survey and Analysis
October 16, 2018 - Differential evolution (DE) is a stochastic algorithm for solving numerical continuous optimization problems. Since its inception, the DE algorithm has become a powerful global optimizer.
๐ŸŒ
IEEE Xplore
ieeexplore.ieee.org โ€บ document โ€บ 534790
Differential evolution: a fast and simple numerical optimizer | IEEE Conference Publication | IEEE Xplore
Differential evolution (DE) is a powerful yet simple evolutionary algorithm for optimizing real-valued multi-modal functions. Function parameters are encoded as floating-point variables and mutated with a simple arithmetic operation.
๐ŸŒ
Cornell University Computational Optimization
optimization.cbe.cornell.edu โ€บ index.php
Differential evolution - Cornell University Computational Optimization Open Textbook - Optimization Wiki
Differential Evolution (DE) is a robust and efficient optimization algorithm widely used for solving non-linear, non-differentiable, and multimodal optimization problems. It was first introduced by R. Storn and K.
๐ŸŒ
arXiv
arxiv.org โ€บ abs โ€บ 2102.03572
Learning adaptive differential evolution algorithm from ...
February 6, 2021 - Abstract:Differential evolution is one of the most prestigious population-based stochastic optimization algorithm for black-box problems. The performance of a differential evolution algorithm depends highly on its mutation and crossover strategy ...