Evolutionary algorithms
Evolutionary Algorithms
- Estimated duration
- 25 minutes
- Related questions
- 10
- Related algorithms
- 6
- Status
- Log in to track
Lesson objectives
- Describing the four components of evolutionary computation.
- Telling GA, ES, EP, GP and DE apart.
- Choosing suitable representations and operators.
Explanation
Evolutionary computation imitates Darwinian evolution: a population, variation through mutation and crossover, and selection of the fittest, over generations.
Historical branches: genetic algorithms (Holland) with binary encoding and basic crossover; evolution strategies (Rechenberg and Schwefel) with real encoding and self-adaptive mutation; evolutionary programming (Fogel) with mutation alone; genetic programming (Koza) for evolving tree programs; and differential evolution (Storn and Price) with difference-based mutation.
The components: the representation (the chromosome), the fitness function, the variation operators (mutation and crossover), and the selection mechanism (for reproduction and for survival). The choice of representation and operators must respect the structure of the problem: permutation crossover (PMX, OX) for ordering problems, SBX for real variables, and uniform crossover for binary masks.
Mathematics
DE/rand/1
v = x_{r1} + F(x_{r2}-x_{r3})ES mutation
x' = x + \sigma N(0, I)Python code
import numpy as np
rng = np.random.default_rng(0)
def uniform_crossover(a, b):
m = rng.random(len(a)) < 0.5
return np.where(m, a, b), np.where(m, b, a)Simplified teaching code that works with NumPy only; for research experiments use a documented library and fix the random seed.
Practical exercise
Compare GA and DE in the Python code attached to their cards on Rastrigin with ten seeds.
Common mistakes
- Using one-point crossover for ordering problems, which produces invalid solutions.
Summary
Evolutionary computation is a broad family; choose the representation and operators according to the structure of the problem.
References
There are no references recorded for this lesson.
Short quiz
5 questions are chosen at random from 10 questions linked to this lesson, and the quiz is graded on the server.
Links within the lab
- Algorithms
- Optimization types
- Related lessons
- In the paths
