← AI Terminology
Evolutionary Algorithms
Evolutionary algorithms (EAs) are optimisation methods inspired by biological evolution — maintaining a population of candidate solutions, evaluating their fitness, and iteratively producing new generations through selection, crossover (recombination), and mutation.
They are gradient-free optimisers suited for problems where gradients are unavailable or the search space is discrete.
They are gradient-free optimisers suited for problems where gradients are unavailable or the search space is discrete.
Why It Matters in AI
EAs are the go-to tool when gradient descent cannot be applied: hyperparameter search over discrete choices, neural architecture search (NAS), robot morphology design, game strategy optimisation, and weight training for policies where backpropagation is impractical. They also inspired OpenAI's Evolution Strategies (ES), a scalable RL alternative that avoids backpropagation entirely.
Key Points
| Aspect | Description |
|---|---|
| Mutation | Random perturbation of offspring — maintains genetic diversity, prevents premature convergence |
| Crossover | Combine parts of two parent solutions to produce offspring |
| Selection | Fitter individuals have higher probability of being chosen as parents for next generation |
| Population | A set of candidate solutions (individuals) evaluated simultaneously |
| Key variants | Genetic Algorithms (GA), Evolution Strategies (ES), NEAT (topology + weights), CMA-ES |
| Fitness function | Measures how good each solution is — the metric being optimised |
Simple Analogy
Breeding racehorses: select the fastest horses, breed them, introduce occasional random mutations (unusual breeding), repeat over generations. Each generation is fitter than the last. The search space isn't defined by a gradient — you just need to be able to measure running speed (fitness).
Common Usage Examples
- NEAT (NeuroEvolution of Augmenting Topologies): evolves both neural network weights and architecture
- OpenAI Evolution Strategies: gradient-free alternative to PPO for RL — scales by parallelising fitness evaluations
- NAS: evolutionary search over architecture configurations (number of layers, filter sizes, skip connections)
- CMA-ES: Covariance Matrix Adaptation ES — state-of-the-art for continuous optimisation without gradients
deapPython library:toolbox.select, toolbox.mate, toolbox.mutate— general EA framework
Summary
In short: Evolutionary algorithms optimise by simulating natural selection — ideal for gradient-free problems where you can measure quality but not compute a derivative.