Evolution strategies and evolutionary programming
Evolution strategies (ES) and evolutionary programming (EP) are population-based, stochastic optimisation methods using mutation, recombination and selection on real-valued representations — important for continuous optimisation and adaptive control tasks in engineering.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Evolution strategies (ES) and evolutionary programming (EP) are used by engineers for continuous optimisation problems where gradients are unavailable or noisy (for example: parameter tuning of controllers, analog circuit sizing, or design optimisation). They work well on real-valued search spaces and problems with many local optima.
Key ideas
Start from first principles and simple definitions.
Optimization problem: find x in domain D that maximises (or minimises) an objective function f(x). We assume f(x) can be evaluated but may be non-convex, noisy or not differentiable.
Population: a set of candidate solutions. Denoted usually by population size values like μ (number of parents) and λ (number of offspring).
Individual (also candidate, solution): a single member of the population. Represented as a genotype (internal representation used by the algorithm) and a phenotype (the decoded solution used to compute f). In ES/EP the genotype is typically a real-valued vector x ∈ R^n.
Fitness: a scalar value derived from f(x) used to compare individuals. If the task is minimisation, fitness may be −f(x) or we explicitly treat lower as better.
Mutation: a random variation operator that produces new genotypes from a parent. In classical ES/EP the main mutation is Gaussian mutation: add normally distributed noise to real-valued coordinates. Mutation introduces exploration.
Recombination (crossover): combine information from two or more parents to make offspring. Typical recombination types in ES are intermediate (arithmetic) and discrete (component-wise) recombination.
Selection: choose which individuals become parents of the next generation. Two standard ES selection schemes are (μ, λ)-selection and (μ+λ)-selection:
- (μ, λ)-selection: generate λ offspring from μ parents; the next generation's μ parents are the best μ among the λ offspring (parents are discarded).
- (μ+λ)-selection: generate λ offspring from μ parents; next generation's μ parents are the best μ among the union of the μ parents and λ offspring. These are exact definitions used in exam answers.
Self-adaptation: in ES the mutation strength (step-size) σ can be encoded into the genotype and evolved together with x. The standard self-adaptive update applies a log-normal mutation to σ.
1/5 success rule: a heuristic for step-size control. The rule states: monitor the proportion of successful mutations (those that improve fitness) over a window. If the success rate > 1/5, increase the step-size; if it < 1/5, decrease it. This is an empirical control rule used widely in ES.
Evolutionary programming (EP) history and focus: EP (Fogel) emphasises mutation and stochastic variation, originally applied to finite-state machines and later to continuous optimisation using Gaussian mutation and tournament selection. ES (Rechenberg, Schwefel) historically emphasised real-valued representation and step-size adaptation.
Algorithm outline to draw (diagram to sketch in answers):
- Draw a flowchart with boxes: Initialise population → Evaluate fitness → Recombination (optional) → Mutation → Evaluate offspring → Selection ((μ,λ) or (μ+λ)) → Loop until termination. Label arrows and box contents (population sizes μ, λ, mutation σ).
Derivation step universities ask for: show how to produce arithmetic recombination and Gaussian mutation.
- For arithmetic recombination of ρ parents p1..pρ: write the child as x_child = (1/ρ) · Σ_{i=1..ρ} p_i (state this is the definition; show it preserves mean of parents).
- For Gaussian mutation of a coordinate: x' = x + σ·z where z ~ N(0,1). Show that E[x'] = x and Var[x'] = σ^2. Step-by-step: E[x'] = E[x + σz] = x + σ·E[z] = x since E[z]=0; Var[x'] = Var[σz] = σ^2 Var[z] = σ^2.
Assumptions to state explicitly in answers:
- Mutations are independent across coordinates unless stated otherwise.
- Recombination weights are usually equal unless specified.
- Fitness evaluations are deterministic (if noisy, mention noise model).
Differences to remember (short): ES: real-valued, self-adaptive σ, (μ,λ) and (μ+λ). EP: historically focused on mutation-only schemes and tournament selection; both share concepts with genetic algorithms (GAs) but GAs typically use binary or other encodings and emphasise crossover.
Formulas
x'_i = x_i + σ_i · N(0,1) — mutated i-th coordinate; x_i is the parent coordinate (unit depends on problem), σ_i is the standard deviation (same units as x_i). Applies in Gaussian mutation.
x_child = (1/ρ) · Σ_{j=1..ρ} p_j — intermediate (arithmetic) recombination for real-valued parents p_j (vector sum implied). Units: same as coordinates.
(μ, λ) and (μ+λ) — notation meaning described in Key ideas. No units; these are counts.
σ' = σ · exp(τ'·N(0,1) + τ·N_i(0,1)) — self-adaptive update of step-size for an individual coordinate (log-normal update). τ' and τ are learning rates depending on problem dimension n and N are independent standard normals. Applies when σ is encoded and evolved. Common choice: τ' = 1/sqrt(2n), τ = 1/sqrt(2*sqrt(n)).
E[x'] = x — expected value after Gaussian mutation; Var[x'] = σ^2.
1/5 success rule (verbal formula): increase σ if success_rate > 1/5, otherwise decrease σ. In (1+1)-ES a classic variant multiplies σ by a > 1 when success_rate > 1/5 and by a^(-1/4) otherwise; a ≈ 1.5 is commonly used.
Worked examples
Example 1 — small numeric ES step (1D) (model answer style) Problem: Maximise f(x) = −(x−2)^2 (so maximum at x=2) using ES with μ=2 parents and λ=4 offspring. Parents: p1 = 1.0, p2 = 3.0. Use discrete recombination followed by Gaussian mutation with σ = 0.5. Use given random draws (for reproducibility): standard-normal draws z = [0.2, −1.0, 0.8, −0.1] for the four offspring. Steps:
- Recombination (arithmetic): child base value = (p1+p2)/2 = 2.0.
- Mutation: apply x' = x + σ·z.
- Offspring 1: x1 = 2.0 + 0.5·0.2 = 2.0 + 0.10 = 2.10
- Offspring 2: x2 = 2.0 + 0.5·(−1.0) = 2.0 − 0.50 = 1.50
- Offspring 3: x3 = 2.0 + 0.5·0.8 = 2.0 + 0.40 = 2.40
- Offspring 4: x4 = 2.0 + 0.5·(−0.1) = 2.0 − 0.05 = 1.95
- Evaluate fitness f(x) = −(x−2)^2:
- f(x1)= −(0.10)^2 = −0.01
- f(x2)= −(−0.50)^2 = −0.25
- f(x3)= −(0.40)^2 = −0.16
- f(x4)= −(−0.05)^2 = −0.0025
- Selection (μ, λ): choose best μ=2 offspring by fitness (larger is better here): best are x4 = 1.95 (f = −0.0025) and x1 = 2.10 (f = −0.01). Final answer: new parent set = {1.95, 2.10} (showing step-by-step numbers). Bold final best: x = 1.95 and x = 2.10.
Example 2 — self-adaptation numeric (2D) Problem: one parent with genotype x = [0.5, −1.0] and step-sizes σ = [0.3, 0.3], problem dimension n = 2. Use self-adaptive update σ' = σ·exp(τ'·N_g + τ·N_i) where global normal draw N_g and per-coordinate normals N_i are given. Use N_g = 0.4, N_local = [0.1, −0.8]. Use τ' = 1/√(2n) and τ = 1/√(2√n). Steps:
- Compute τ' and τ for n = 2: τ' = 1/√(4) = 0.5; τ ≈ 0.595 (approx). (Verify exact constants in review.)
- Update σ for coordinate 1: σ1' = 0.3 · exp(0.5·0.4 + 0.595·0.1) = 0.3 · exp(0.2 + 0.0595) = 0.3 · exp(0.2595) ≈ 0.3 · 1.2966 = 0.3890 For coordinate 2: σ2' = 0.3 · exp(0.5·0.4 + 0.595·(−0.8)) = 0.3 · exp(0.2 − 0.476) = 0.3 · exp(−0.276) ≈ 0.3 · 0.759 = 0.2277
- Mutate coordinates using normal draws for mutation e.g., m = [0.6, −0.3]: x1' = 0.5 + 0.3890·0.6 = 0.5 + 0.2334 = 0.7334 x2' = −1.0 + 0.2277·(−0.3) = −1.0 − 0.06831 = −1.06831 Final answer: new genotype ~ [0.7334, −1.0683] with step-sizes [0.3890, 0.2277].
Example 3 — model-answer theory question (long form) Question (typical exam): "Explain (μ, λ) and (μ+λ) selection in evolution strategies, compare them and state when each is preferred." Model answer (short): Define (μ, λ) and (μ+λ) exactly as above. Compare: (μ, λ) is non-elitist (parents discarded) and increases exploration because new solutions must outperform current parents; (μ+λ) is elitist (keeps parents) and therefore safer — it keeps best solutions so convergence is faster but can reduce exploration and risk premature convergence. When to prefer: use (μ, λ) when robust exploration is needed (e.g., noisy rugged landscapes) and (μ+λ) when loss of good solutions is costly or evaluations are expensive and you want steady improvement.
Common mistakes
- Forgetting units: σ has same units as x; when writing formulas explicitly mention units.
- Using the 1/5 rule but forgetting to state that it is empirical (not a proof) and that a multiplicative factor is required to change σ.
- Writing self-adaptive σ' = σ + ... instead of log-normal multiplicative update — the correct standard is multiplicative via exp(...).
For your exam
Question types to expect:
- Definitions and short notes: define ES, EP, mutation, recombination, (μ,λ) and (μ+λ).
- Derivations: derive E[x'] and Var[x'] for Gaussian mutation; show arithmetic recombination preserves parental mean.
- Algorithm description: draw and explain the ES flowchart — include μ and λ, recombination, mutation, selection steps.
- Numerical steps: do one generation of ES with given parents, σ and random draws (like Example 1). Show all steps and pick new parents.
- Compare/contrast: ES vs EP vs GA; (μ,λ) vs (μ+λ); self-adaptation vs fixed σ. Full-marks answers define terms, state assumptions, show steps/derivations, and give a short concluding remark.
Quick check
- What does (μ, λ) mean in evolution strategies?
- Give the Gaussian mutation formula for one coordinate.
- State the 1/5 success rule in one sentence.
Answers: 1) μ parents produce λ offspring; next generation selects best μ from the λ offspring (parents discarded). 2) x'_i = x_i + σ_i · N(0,1). 3) If the fraction of successful mutations > 1/5 increase step-size; if < 1/5 decrease step-size (empirical rule).
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?