Explain the Differential Evolution method

前端 未结 3 2010
失恋的感觉
失恋的感觉 2021-02-01 07:26

Can someone please explain the Differential Evolution method? The Wikipedia definition is extremely technical.

A dumbed-down explanation followed by a simple example wou

3条回答
  •  名媛妹妹
    2021-02-01 07:57

    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
    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.

提交回复
热议问题