Supriya Ghosh (Editor)

Differential evolution

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Differential evolution

In evolutionary computation, differential evolution (DE) is a method that optimizes 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 problem being optimized and can search very large spaces of candidate solutions. However, metaheuristics such as DE do not guarantee an optimal solution is ever found.

Contents

DE is used for multidimensional real-valued functions but does not use the gradient of the problem being optimized, which means DE does not require for 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.

DE optimizes a problem by maintaining a population of candidate solutions and creating new candidate solutions by combining existing ones according to its simple formulae, and then keeping whichever candidate solution has the best score or fitness on the optimization problem at hand. In this way the optimization problem is treated as a black box that merely provides a measure of quality given a candidate solution and the gradient is therefore not needed.

DE is originally due to Storn and Price. Books have been published on theoretical and practical aspects of using DE in parallel computing, multiobjective optimization, constrained optimization, and the books also contain surveys of application areas. Excellent surveys on the multi-faceted research aspects of DE can be found in journal articles like.

Algorithm

A basic variant of the DE algorithm works by having a population of candidate solutions (called agents). These agents are moved around in the search-space by using simple mathematical formulae to combine the positions of existing agents from the population. If the new position of an agent is an improvement it is accepted and forms part of the population, otherwise the new position is simply discarded. The process is repeated and by doing so it is hoped, but not guaranteed, that a satisfactory solution will eventually be discovered.

Formally, let f : R n R be the cost function which must be minimized or fitness function which must be maximized. The function takes a candidate solution as argument in the form of a vector of real numbers and produces a real number as output which indicates the fitness of the given candidate solution. The gradient of f is not known. The goal is to find a solution m for which f ( m ) f ( p ) for all p in the search-space, which would mean m is the global minimum. Maximization can be performed by considering the function h := f instead.

Let x R n designate a candidate solution (agent) in the population. CR [ 0 , 1 ] is called the crossover probability. Let F [ 0 , 2 ] be called the differential weight. Both these parameters are chosen by the practitioner along with the population size NP 4 (see below). The basic DE algorithm can then be described as follows:

  • Initialize all agents x with random positions in the search-space.
  • Until a termination criterion is met (e.g. number of iterations performed, or adequate fitness reached), repeat the following:
  • For each agent x in the population do:
  • Pick three agents a , b , and c from the population at random, they must be distinct from each other as well as from agent x
  • Pick a random index R { 1 , , n } ( n being the dimensionality of the problem to be optimized).
  • Compute the agent's potentially new position y = [ y 1 , , y n ] as follows:
  • For each i { 1 , , n } , pick a uniformly distributed number r i U ( 0 , 1 )
  • If r i < C R or i = R then set y i = a i + F × ( b i c i ) otherwise set y i = x i
  • (In essence, the new position is the outcome of the binary crossover of agent x with the intermediate agent z = a + F × ( b c ) .)
  • If f ( y ) < f ( x ) then replace the agent in the population with the improved candidate solution, that is, replace x with y in the population.
  • Pick the agent from the population that has the highest fitness or lowest cost and return it as the best found candidate solution.
  • Parameter selection

    The choice of DE parameters F , CR and NP can have a large impact on optimization performance. Selecting the DE parameters that yield good performance has therefore been the subject of much research. Rules of thumb for parameter selection were devised by Storn et al. and Liu and Lampinen. Mathematical convergence analysis regarding parameter selection was done by Zaharie. Meta-optimization of the DE parameters was done by Pedersen and Zhang et al.

    Variants

    Variants of the DE algorithm are continually being developed in an effort to improve optimization performance. Many different schemes for performing crossover and mutation of agents are possible in the basic algorithm given above, see e.g. More advanced DE variants are also being developed with a popular research trend being to perturb or adapt the DE parameters during optimization, see e.g. Price et al., Liu and Lampinen, Qin and Suganthan, Civicioglu and Brest et al. There are also some work in making a hybrid optimization method using DE combined with other optimizers.

    Sample code

    The following is a specific pseudocode implementation of differential evolution, written similar to the Java language. For more generalized pseudocode, please see the listing in the Algorithm section above.

    References

    Differential evolution Wikipedia