Position updating¶
In each iteration the position of every candidate solution is updated. The update rule depends on the candidate's role in the hierarchy: global best, elite, or ordinary.
Global best — Lévy-flight step¶
The globally best candidate refines its position with a Lévy-flight step, which encourages local exploration around the best solution found so far:
where \(\Delta^{Levy}_{iD} = 2\%\,\lvert LB_{iD}-UB_{iD}\rvert\) is 2 % of the bound span and the Lévy step \(l_{iD}\) follows Mantegna's algorithm:
with \(u_{iD}\sim\mathcal{N}(0,\sigma_u^2)\), \(v_{iD}\sim\mathcal{N}(0,\sigma_v^2)\) and \(\Gamma\) the gamma function. The exponent \(1<\beta<2\) controls the step size; \(\beta = 1.99\) is the default, giving small, concentrated steps near the global best.
The stochastic mask¶
Both the elite and the ordinary update blend an attractor \(\mathbf{A}\) with a reference position using a crossover mask controlled by the crossover rate \(CR\):
where \(j_{\text{rand}}\) is a randomly chosen dimension that is always taken from the attractor (ensuring at least one component changes).
Elite candidate solutions¶
Elite candidates guide their sub-populations towards the global best. Their position update is
with the attractor formed from the candidate's own best, a first reference position and a differential term:
The reference vector \(\mathbf{R}=[\mathbf{x}_{r_0},\mathbf{x}_{r_1},\mathbf{x}_{r_2}]\) is built from three distinct positions sorted by fitness (so \(\mathbf{x}_{r_0}\) is the best of the three):
- \(\mathbf{x}_{r_0}\) is the global best, or a random pick from the top 5 % of candidates, distinct from \(\mathbf{x}_{E,PB,S_i}\);
- \(\mathbf{x}_{r_1},\mathbf{x}_{r_2}\) are drawn from the unity \(\boldsymbol{\Omega}=\mathbf{M}\cup\mathbf{P}_B\), where \(\mathbf{M}\) is the archive of historical elite positions and \(\mathbf{P}_B\) are the personal-best positions of the population, all distinct from each other and from \(\mathbf{x}_{E,PB,S_i}\).
By default the archive size equals the population size.1
Ordinary candidate solutions¶
Ordinary candidates orient towards their sub-population elite (a local attractor) rather than the global best:
Here \(\mathbf{x}_{r_1,S_i},\mathbf{x}_{r_2,S_i}\) are two randomly selected, distinct personal-best positions from the same sub-population, ordered so that \(f(\mathbf{x}_{r_1,S_i}) < f(\mathbf{x}_{r_2,S_i})\).
The blend coefficients \(\phi_1\) and \(\phi_2\)¶
\(\phi_1\) is drawn from a Cauchy distribution with location \(1\) and scale \(0.2\), constrained to \(0<\phi_1\le 1\):
Algorithm 2 — Sampling \(\phi\) from a Cauchy distribution
For \(\phi_2\) the paper evaluates four variants; the recommended default for \(n_D>10\) is the Cauchy variant with location \(\bar\phi = 0.5 + 0.5\,(1-DIV)\) and scale \(0.2\):
| Variant | Definition of \(\phi_2\) |
|---|---|
| \(\phi_2^{\phi_1}\) | \(\phi_2 = \phi_1\) |
| \(\phi_2^{cauchy}\) (default) | Cauchy, location \(\bar\phi=0.5+0.5(1-DIV)\), scale \(0.2\) |
| \(\phi_2^{normal}\) | \(\mathcal{N}(\bar\phi,\,0.2^2)\) |
| \(\phi_2^{gamma}\) | Gamma, shape \(2\bar\phi\), scale \(1\) |
All variants are passed through Algorithm 2 to enforce \(0<\phi_2\le 1\).
Population diversity \(DIV\)¶
The normalised diversity drives both \(\phi_2\) and the restart criterion:
where \(\mathbf{P}\) is the matrix of personal-best positions and \(DIV_0\) is the diversity measured at the start of the optimisation. As the population clusters, \(DIV\) falls towards \(0\); once it drops below a threshold the algorithm restarts.
-
In Eq. (7) of the paper the differential term is written with the two trailing reference positions; the implementation uses the three sorted reference positions \(\mathbf{x}_{r_0},\mathbf{x}_{r_1},\mathbf{x}_{r_2}\) with the differential \(\mathbf{x}_{r_1}-\mathbf{x}_{r_2}\), as shown above. ↩