Preview
IB DP Computer Science — A4 Machine learning — Machine learning approaches | HL | A4.3.7
📋 What You Will Learn
- Describe the stages of a genetic algorithm: population, fitness function, selection, crossover, mutation, evaluation and termination
- Trace one full generation of a genetic algorithm by hand
- Explain how candidate solutions are encoded as chromosomes
- Describe how genetic algorithms solve real optimisation problems such as the travelling salesperson problem (TSP)
- Evaluate when a genetic algorithm is (and is not) an appropriate technique
🧬 Why This Matters Breeders never designed the fastest racehorse directly — they repeatedly bred the fastest pairs and occasionally nature threw in a surprise mutation. Genetic algorithms (GAs) do the same to solutions : keep the fittest, combine them, mutate a little, repeat — and good answers to problems too large to search exhaustively "evolve".
The Idea: Search by Simulated Evolution
- Many real problems (routing, timetabling, design) have astronomically many candidate solutions — brute force is impossible (a 20-city tour already has ~10