Skip to content

Success History based Adaptive Differential Evolution with Linear Population Size Reduction (L-SHADE)

SHADE with a population that shrinks over the run. One of the strongest methods here for continuous problems with a large budget (10 000 evaluations per dimension or more).

LSHADE

LSHADE(*, pop_size=None, min_pop_size=4, memory_size=6, archive_rate=2.6, p_best_rate=0.11, **kwargs)

SHADE with Linear Population Size Reduction (Tanabe and Fukunaga, 2014).

Works like SHADE with three changes. The pbest rate p is fixed. CR is updated with the weighted Lehmer mean, and a slot gets the terminal value (NaN in m_cr) when it already has it or when all successful CR values are 0. Trial vectors from a terminal slot use CR = 0. After each iteration the population shrinks to round(N_init + (N_min - N_init) * progress), and the worst members are removed.

The progress is nfe / max_nfe when max_nfe is set. Otherwise it is the share of the planned iterations used, so the population still reaches N_min at the end of the run. Set max_nfe: when max_iter ends the run first, the population stops shrinking early.

Parameters

  • pop_size: initial population size N_init. None (default) gives 18 n, where n is the number of codes.
  • min_pop_size: final population size N_min (default 4).
  • memory_size: H, the number of memory slots (default 6).
  • archive_rate: the archive holds at most round(archive_rate * N) members, where N is the current population size (default 2.6).
  • p_best_rate: p, the fraction of the best members that pbest is drawn from (default 0.11).

Reference: R. Tanabe and A. Fukunaga, "Improving the search performance of SHADE using linear population size reduction", IEEE Congress on Evolutionary Computation (CEC 2014), 1658 to 1665.

The rules it shares with JADE and SHADE are on the JADE page.

Example

import ypea

problem = ypea.Problem(
    ypea.Real("x", shape=20, lb=-10, ub=10),
    lambda sol: ypea.benchmarks.sphere(sol.x),
    vectorized=True,
    name="sphere",
)

alg = ypea.LSHADE(max_nfe=20_000)
result = alg.solve(problem, seed=1)
print(result.summary())
L-SHADE on sphere
  best objective value: 4.58976e-08
  feasible: True (violation 0)
  evaluations: 20000, iterations: 250, time: 0.072 s, stopped by: max_nfe

Differs from Python: MATLAB draws its own random numbers, so the best value differs from Python's.

problem = ypea.Problem( ...
    vars=ypea.Real("x", shape=20, lb=-10, ub=10), ...
    objective=@(sol) ypea.benchmarks.sphere(sol.x), ...
    vectorized=true, ...
    name="sphere");

alg = ypea.LSHADE(max_nfe=20000);
result = alg.solve(problem, seed=1);
disp(result.summary())
L-SHADE on sphere
  best objective value: 6.02505e-08
  feasible: true (violation 0)
  evaluations: 20000, iterations: 250, time: 0.193 s, stopped by: max_nfe

Search on Rastrigin

L-SHADE solutions on Rastrigin at four iterations, and its convergence
L-SHADE with default settings, 50 iterations on Rastrigin in two dimensions (seed 1). The red points are the current population, which shrinks as the run goes on. The open diamond is the best solution so far, and the plus sign the global minimum.