Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Breed the best
Imagine searching for the best kite design by trial. Build a handful of random variations of your current design, fly them all, and keep the few that flew best. Make your next batch of variations around the winners. If the winners all lean one way (longer tail, smaller wings), vary more in that direction next time. Repeat.
That’s an evolution strategy. The population “learns” where to search, and you never need a formula for how good a kite is: you only fly them and compare.
CMA-ES is the default black-box optimizer for tough continuous problems with tens to hundreds of variables: spacecraft trajectory design, robot gait and controller parameters, antenna and aerodynamic shapes. Evolution strategies also train neural-network control policies with thousands of CPUs in parallel, with no backpropagation needed.
- 1. An evolution strategy keeps…
- 2. To decide which candidates are best, ES needs…
- 3. Evaluating many candidates at once makes ES…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.(1+1)-ES with the 1/5th success rule (Rechenberg, 1973)
Mutate with , and keep if it’s no worse. Adapt the step size:
- on success, ;
- on failure, .
is stable when about 1 in 5 mutations succeeds. That success rate is near-optimal for progress on simple landscapes.
(μ/μ, λ)-ES and CMA-ES (Hansen and Ostermeier, 2001)
Each generation:
- Sample points with .
- Rank them and recombine the best with log-rank weights: .
- Update the covariance toward the successful steps (rank-μ update) and along the evolution path (rank-1 update).
- Update the step size from the length of the conjugate evolution path (cumulative step-size adaptation).
Defaults: and . They are almost never tuned.
- 1. The 1/5th rule keeps σ stable when the success rate is about…
- 2. CMA-ES adapts…
- 3. Default population size for n = 5 is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.What CMA-ES learns
On a convex quadratic, the covariance converges toward a multiple of the inverse Hessian. Sampling from makes the problem look perfectly conditioned, much as quasi-Newton methods (A6.3-5) learn from gradients. CMA-ES learns it from rankings alone.
Invariances
- Monotone transformations of : only ranks are used, so , and behave identically.
- Rotations and affine changes of the search space (with a matching initial ): there are no axis-aligned assumptions.
These make CMA-ES remarkably robust. Its cost is memory and time per sample, and it typically needs about evaluations on ill-conditioned problems.
Natural evolution strategies for large n
Salimans et al. (2017) optimize the expected return by gradient ascent with the estimate . That’s the zeroth-order estimator of A6.4-1. Practical ingredients:
- antithetic pairs to reduce variance;
- rank-based fitness shaping, robust to reward scale and outliers;
- one shared random seed per worker, so only scalar returns need to be communicated.
It scales to thousands of CPUs and millions of policy parameters.
- 1. On a quadratic, CMA-ES's covariance approaches…
- 2. CMA-ES is invariant to replacing f by…
- 3. OpenAI-style ES communicates between workers…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Deriving the 1/5th rule’s balance
With up-factor on success (probability ) and down-factor on failure, . That’s zero when . With and : . ∎
Why antithetic sampling helps
: by Taylor, the even-order terms (including and the curvature term) cancel, leaving . Without mirroring, the term has mean zero but huge variance when is large. ∎
ES as gradient ascent on a smoothed objective
(Stein, A6.4-1). ES ascends the Gaussian-smoothed return, which smooths over discontinuities, contacts and saturation in robot rollouts. When the update is also measured in the Fisher metric of the search distribution, it becomes the natural gradient (Wierstra et al., 2014), linking ES to A6.3-6.
Exercise 3.1: Stationary success rate with up-factor e^(1/2) and down-factor e^(−1/8)
.
- 1. With up-factor eᵃ and down-factor e⁻ᵇ, σ is stationary at success probability…
- 2. Antithetic sampling cancels…
- 3. ES ascends the gradient of…
Level 4: Expert
★★★★★ Expert⏱ 40 minResearchers: original papers and open problems.Training a control policy without backpropagation
A planar point robot must reach the origin from four starts under saturating acceleration limits. The policy is a linear feedback with 8 gains. Saturation makes the return non-differentiable in . OpenAI-style ES (8 antithetic pairs per iteration, rank shaping, 50 iterations, about 850 episodes) goes from the zero policy’s return of about −21.6 to −5.7. That matches a hand-tuned PD controller and clearly beats random search with the same number of episodes.
Evolution strategies in AI, robotics and aerospace
- Spacecraft trajectory design: CMA-ES and differential evolution are standard global optimizers in ESA’s pykep/pagmo toolkits (Izzo, 2012).
- Robot locomotion and morphology: gait and controller parameters (Hansen et al. on walking robots; Lipson and Pollack, 2000, evolving robot bodies).
- Deep RL alternative: ES scales to thousands of workers on MuJoCo and Atari (Salimans et al., 2017). Augmented random search shows linear policies suffice for many locomotion tasks (Mania, Guy and Recht, 2018).
- Hyperparameter and architecture search: CMA-ES is a strong baseline for continuous hyperparameters (Loshchilov and Hutter, 2016).
References
- I. Rechenberg (1973). Evolutionsstrategie. Frommann-Holzboog.
- N. Hansen, A. Ostermeier (2001). “Completely derandomized self-adaptation in evolution strategies.” Evolutionary Computation, 9(2).
- N. Hansen (2016). “The CMA evolution strategy: a tutorial.” arXiv:1604.00772.
- D. Wierstra et al. (2014). “Natural evolution strategies.” JMLR, 15.
- T. Salimans, J. Ho, X. Chen, S. Sidor, I. Sutskever (2017). “Evolution strategies as a scalable alternative to reinforcement learning.” arXiv:1703.03864.
- H. Mania, A. Guy, B. Recht (2018). “Simple random search of static linear policies is competitive for reinforcement learning.” NeurIPS.
- D. Izzo (2012). “PyGMO and PyKEP: open source tools for massively parallel optimization in astrodynamics.” ICATT.
- H. Lipson, J. Pollack (2000). “Automatic design and manufacture of robotic lifeforms.” Nature, 406.
- I. Loshchilov, F. Hutter (2016). “CMA-ES for hyperparameter optimization of deep neural networks.” ICLR Workshop.
- H.-G. Beyer, H.-P. Schwefel (2002). “Evolution strategies — a comprehensive introduction.” Natural Computing, 1.