liveBook · Manning

Evolution strategy

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

An evolution strategy is an evolutionary optimization method that searches for solutions through population-based variation and selection, typically emphasizing stochastic mutation of candidate parameters.

An evolution strategy (ES) extends a genetic algorithm by giving each individual a second vector: a strategy that controls how mutation is applied. As evolution proceeds, the strategy vector adapts mutation magnitude, helping the population vary and converge more efficiently than a fixed mutation setting. section 4.4 section 4.4.1

In DEAP, an ES individual holds candidate values plus its strategy array. Blend crossover and log-normal mutation operate on these structures, while a minimum-strategy check prevents strategy values from dropping below a configured floor. Selection, fitness evaluation, and population evolution otherwise closely resemble a genetic-algorithm workflow. section 4.4.1

Listing 4.22 EDL_4_4_ES.ipynb: Setting up the toolbox
toolbox = base.Toolbox()
toolbox.register("individual", generateES, creator.Individual, 
 screator.Strategy,
    IND_SIZE, MIN_VALUE, MAX_VALUE, MIN_STRATEGY, MAX_STRATEGY)            #1
toolbox.register("population", tools.initRepeat, list, toolbox.individual)
toolbox.register("mate", tools.cxESBlend, alpha=0.1)                       #2
toolbox.register("mutate", tools.mutESLogNormal, c=1.0, indpb=0.03)        #3
toolbox.register("select", tools.selTournament, tournsize=3)
 
toolbox.decorate("mate", checkStrategy(MIN_STRATEGY))                      #4
toolbox.decorate("mutate", checkStrategy(MIN_STRATEGY))                    #4

Inspect the toolbox setup for the ES-specific operators: ES blend crossover, log-normal mutation, tournament selection, and minimum-strategy enforcement. section 4.4.1

Function approximation

Encode polynomial coefficients as the individual, evaluate mean squared error against sampled target points, and evolve the population with a μ, λ loop. The exercise offers a continuous fifth-degree polynomial plus absolute-value and step targets, making it possible to inspect where adaptive mutation helps and where it struggles. section 4.4.1 section 4.4.3

ES is applied to several optimization roles:

  • Upgrade an EvoLisa genetic-algorithm implementation to ES and compare output after 3,000 ES generations with a GA run for 7,000 generations. section 4.4.2
  • Search neural-network hyperparameters by making individual size match the hyperparameter count, then training and scoring the selected candidate. section 5.5.1
  • Optimize NumPy network weights for circles and moons datasets, then compare ES behavior with differential evolution and genetic algorithms. section 6.3

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Walks through DEAP data setup, strategy-bearing individuals, operators, fitness, and evolution, while deferring deeper code review for later neuroevolution examples.
Examples
Uses polynomial, absolute-value, and step functions; EvoLisa; hyperparameter searches; and circles and moons network-weight optimization.
What it assumes
Builds on genetic-algorithm foundations and previously introduced DEAP patterns.
What you can do after
Apply it via DEAP to evolve parameter vectors with learned mutation strategies and compare results against GA or differential evolution.
How it connects
Connects genetic algorithms, mutation rate, function approximation, differential evolution, hyperparameter optimization, and neuroevolution.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.