CMA-ES
Also known as Covariance Matrix Adaptation Evolution Strategy
optimization evolutionary-planning
CMA-ES minimises a function of real variables by sampling λ points from a multivariate normal distribution N(m, σ² C). After each generation it moves the mean m towards a weighted mean of the best points. It learns the covariance matrix C from successful steps, so the samples line up with the valleys of the function; it also adapts the global step size σ from the length of an averaged search path (cumulative step-size adaptation). The update uses only the ranks of the costs, so any strictly increasing transform of the cost gives the same run. Use it for non-convex, badly scaled or non-separable continuous problems with up to a few hundred variables; it is a local, stochastic method, and restarts with larger populations (IPOP) make it more global.
Pseudocode
algorithm CMA-ES(m, σ, f)input: initial mean m, initial step size σ, cost function foutput: the best point found when a termination criterion firesC ← IB, D ← I, Ip_σ, p_c ← 0, 0g ← 0repeatfor k in 1, …, λ do ▷ askz_k ← N(0, I)y_k ← B · D · z_kx_k ← m + σ · y_krank the x_k by f(x_k) ▷ tell⟨y⟩ ← ∑ w_i · y_i:λ over the μ best ▷ positive weights onlym ← m + c_m · σ · ⟨y⟩p_σ ← (1 − c_σ) · p_σ + √(c_σ (2 − c_σ) μ_eff) · B · ⟨z⟩h_σ ← 1 if ‖p_σ‖ is not too long, else 0p_c ← (1 − c_c) · p_c + h_σ · √(c_c (2 − c_c) μ_eff) · ⟨y⟩w°_i ← w_i, or w_i · n / ‖z_i:λ‖² for a negative w_i ▷ active weightsC ← decay · C + c₁ · p_c · p_cᵀ + c_μ · ∑ w°_i · y_i:λ · y_i:λᵀσ ← σ · exp((c_σ / d_σ) · (‖p_σ‖ / E‖N(0, I)‖ − 1))g ← g + 1if g is a multiple of the eigen interval then ▷ lazy, Appendix B.2B, D ← eigendecomposition-of(C) ▷ C = B D² Bᵀuntil a termination criterion fires or budget exhaustedreturn the cheapest point evaluatedIn the crates
evolutionary-planningCMA-ES exactly per Hansen's tutorial, with active weights, lazy eigendecomposition, all Appendix B.3 termination criteria and an ask/tell interface.
Lineage
Comes from
builds on (μ/ρ,λ)-ES
Led to
IPOP-CMA-ES builds on it
Papers
- The CMA Evolution Strategy: A Tutorial Nikolaus Hansen · 2016
- A Restart CMA Evolution Strategy With Increasing Population Size Anne Auger, Nikolaus Hansen · 2005· 2005 IEEE Congress on Evolutionary Computation