Skip to content

Labs · 9618 18.1 · genetic algorithms

Evolve a Catapult: a Genetic Algorithm

Throw a ball over a wall at a target. First aim by hand, then let a population of catapults evolve: the best ones become parents, children mix their genes, and mutation brings new ideas.

4 levelsFree bench

In the exam

IGCSE 0478/13 May/June 2026 · Question 6(b) and 6(c) · 3 marks

A computer game uses AI to create extra characters (players). (b) The AI uses machine learning. State what is meant by machine learning. (c) Explain one example of how the AI could use machine learning to create extra characters.

Points that gain marks

  • (b) A program that can adapt its own data and processes by itself.
  • (c) It could analyse the player's input actions, or past extra characters that played well …
  • (c) … and create or adapt the actions of a new character based on those past characters.

In this lab: This is what the genetic algorithm does: it keeps the catapults that threw best, and makes the next generation from their genes.

More real experiments

All labs →

Log in or create account

IGCSE, A-Level & AP