Skip to content

Success History based Adaptive Differential Evolution (SHADE)

Differential evolution that adapts its scale factor F and crossover rate CR from a memory of recent successes. A strong choice for continuous problems with a large budget.

SHADE

SHADE(*, memory_size=100, archive_rate=1.0, p_best_max=0.2, **kwargs)

Success History based Adaptive DE (Tanabe and Fukunaga, 2013).

Strategy DE/current-to-pbest/1/bin with an archive. Each trial vector i picks a random memory slot r and draws CR_i ~ N(M_CR[r], 0.1) clipped to [0, 1] and F_i ~ Cauchy(M_F[r], 0.1), drawn again while F_i <= 0 and truncated to 1. Its pbest rate p_i is uniform in [2/N, p_best_max]. After each iteration with at least one success, slot k (cycling through the memory) gets the weighted Lehmer mean of S_F and the weighted arithmetic mean of S_CR, with weights proportional to the improvements. All slots start at 0.5.

Parameters

  • pop_size: population size N (default 100).
  • memory_size: H, the number of memory slots (default 100).
  • archive_rate: the archive holds at most round(archive_rate * N) members (default 1).
  • p_best_max: upper limit of p_i (default 0.2).

Reference: R. Tanabe and A. Fukunaga, "Success-history based parameter adaptation for differential evolution", IEEE Congress on Evolutionary Computation (CEC 2013), 71 to 78.

The rules it shares with JADE and L-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.SHADE(max_nfe=20_000)
result = alg.solve(problem, seed=1)
print(result.summary())
SHADE on sphere
  best objective value: 1.64967e-07
  feasible: True (violation 0)
  evaluations: 20000, iterations: 199, time: 0.0545 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.SHADE(max_nfe=20000);
result = alg.solve(problem, seed=1);
disp(result.summary())
SHADE on sphere
  best objective value: 6.55824e-08
  feasible: true (violation 0)
  evaluations: 20000, iterations: 199, time: 0.608 s, stopped by: max_nfe

Search on Rastrigin

SHADE solutions on Rastrigin at four iterations, and its convergence
SHADE with default settings, 50 iterations on Rastrigin in two dimensions (seed 1). The red points are the current population, whose size stays fixed. The open diamond is the best solution so far, and the plus sign the global minimum.