An evolutionary algorithm (EA) is a population-based, stochastic optimization method that searches for good solutions by repeatedly selecting, recombining and mutating candidate solutions, in loose analogy with natural evolution. In evolutionary computation, the term serves as the umbrella name for genetic algorithms, evolution strategies, evolutionary programming, genetic programming and differential evolution.
Evolutionary algorithms need only a way to score each candidate, not gradients or a closed-form model of the problem. That property makes them a practical choice for black-box, noisy, discontinuous or multi-objective problems in artificial intelligence and engineering, at the cost of many more function evaluations than gradient-based methods.
How an evolutionary algorithm works
Every EA maintains a population of candidate solutions and improves it over successive generations. The loop is simple, and the power comes from repeating it thousands of times while selection pressure steers the population toward better regions of the search space.
- Initialize a population, usually at random within the allowed bounds.
- Evaluate each individual with the fitness function.
- Select parents, favoring higher fitness.
- Create offspring with crossover and mutation.
- Choose survivors for the next generation, often with elitism.
- Stop when a budget, a target fitness or stagnation is reached.
The main building blocks and their roles are summarized below. Each one is a design decision, and the right choice depends on how solutions are encoded. The distinction between genotype and phenotype matters here: operators act on the encoded genotype, while the fitness function evaluates the decoded phenotype, so a poor mapping between the two can make small genetic changes produce erratic jumps in quality.
| Component | Role in the search | Common choices |
|---|---|---|
| Representation | Encodes a solution as a genotype | Bit strings, real vectors, permutations, trees |
| Fitness function | Scores solution quality | Objective value, simulation result, penalty terms |
| Selection | Biases reproduction toward good individuals | Tournament, rank-based, fitness proportionate |
| Crossover | Combines information from parents | One-point, uniform, simulated binary |
| Mutation | Introduces new variation | Bit flip, Gaussian noise, swap |
| Replacement | Decides who survives | Generational, steady-state, plus or comma schemes |
Main families of evolutionary algorithms
The EA families emerged independently in the 1960s and 1970s and differ mainly in representation and in which operator carries the search. Modern practice mixes their ideas freely, but the original distinctions still guide method selection.
| Family | Typical representation | Main variation operator | Typical use |
|---|---|---|---|
| Genetic algorithm | Bit strings or integers | Crossover | Combinatorial and discrete problems |
| Evolution strategies | Real-valued vectors | Gaussian mutation with self-adaptation | Continuous parameter tuning |
| Evolutionary programming | Finite-state machines or vectors | Mutation only | Behavior and parameter optimization |
| Genetic programming | Expression trees or graphs | Subtree crossover and mutation | Symbolic regression, program synthesis |
| Differential evolution | Real-valued vectors | Difference-vector mutation | Continuous global optimization |
Advanced descendants include CMA-ES, which learns a covariance matrix to shape mutations, NSGA-II for multi-objective problems and MAP-Elites for quality diversity. Each one keeps the population-based loop but changes how variation or survival is organized.
Hybrid designs are also common. A memetic algorithm adds local search to each offspring, which often speeds convergence on structured problems, while an island model splits the population into subpopulations that exchange migrants occasionally to preserve diversity and use parallel hardware efficiently.
Key parameters and their effects
Performance depends strongly on a few control parameters. Poor settings cause either premature convergence, where diversity collapses around a local optimum, or slow drift with little progress.
| Parameter | Typical range | Effect when too low | Effect when too high |
|---|---|---|---|
| Population size | 20 to several thousand | Loss of diversity | Slow progress per evaluation |
| Mutation rate | About 1/L per gene for bit strings | Stagnation | Random search behavior |
| Crossover probability | 0.6 to 0.95 | Little recombination | Disruption of good structures |
| Tournament size | 2 to 7 | Weak selection pressure | Premature convergence |
| Elite count | 1 to 5 percent of population | Best solution can be lost | Reduced exploration |
In the table, L is the genome length. Evolution strategies and CMA-ES reduce tuning effort through self-adaptation, in which the step sizes are themselves evolved alongside the solutions.
Evolutionary algorithms compared with other optimizers
An EA is rarely the fastest method when gradients are available and the landscape is smooth. Its strength is robustness on rugged or poorly understood fitness landscapes, and its population naturally supports parallel evaluation.
| Method | Needs gradients | Strength | Weakness |
|---|---|---|---|
| Evolutionary algorithm | No | Global search, multi-objective fronts | Many evaluations |
| Gradient descent | Yes | Very fast on smooth problems | Local optima, needs differentiability |
| Simulated annealing | No | Simple, single solution | Sequential, sensitive to cooling schedule |
| Bayesian optimization | No | Few evaluations for costly functions | Scales poorly beyond about 20 dimensions |
| Particle swarm optimization | No | Few parameters, fast early progress | Weaker on discrete problems |
In machine learning, evolutionary methods appear in neuroevolution, hyperparameter search and neural architecture search. For training the weights of large networks, however, gradient methods remain far more efficient, so EAs usually optimize structure or settings rather than millions of weights.
Limitations and common mistakes
Evolutionary algorithms offer no general guarantee of finding the global optimum in finite time, and the no free lunch theorems show that no optimizer wins on all problems. Results are stochastic, so a single run proves very little.
- Too few runs: report results over 20 to 30 independent seeds with statistical tests.
- Weak fitness design: an exploitable fitness function produces solutions that satisfy the score but not the intent.
- Poor encoding: a representation that breaks feasibility wastes most evaluations on invalid solutions.
- Ignoring evaluation cost: when one evaluation takes minutes, surrogate models or Bayesian methods may be more efficient.
A non-technical view
An evolutionary algorithm solves problems the way a plant breeder improves crops. You start with many different attempts. You keep the best ones. You mix them and change them a little. Then you repeat this over and over.
No single attempt needs to be smart. Improvement comes from many small steps and from keeping what works. After hundreds of rounds, the best attempts are often very good, even for problems that nobody knows how to solve directly. The price is patience: the computer must try a very large number of options.
A concrete example
An engineering team designs a lightweight bracket for a drone frame. The shape must survive a set load while using as little material as possible, and every candidate shape is scored with a finite element simulation that takes about 20 seconds. The problem has many local optima and no useful gradients, so the team chooses a real-valued evolutionary algorithm with a population of 60 and two objectives: mass and maximum stress.
Using NSGA-II, the team runs 150 generations, about 9,000 simulations in total, spread across 32 processor cores, which completes in under two hours. The result is a Pareto front of trade-off designs rather than a single answer. The engineers select a design that is about 30 percent lighter than the original part with an acceptable safety margin, and they confirm it with a physical load test before production.