Act 3: Breed
Everyone gets the same budget: 600 komodos. The course gets a little narrower with every pipe. How far can your best komodo fly?
Generation 0
Line: best pipes in each generation.
Your code
Tell a mentor your name and your best code. The projector re-runs it to check.
Your runs
No runs yet.
| Code | Pipes |
|---|
What is going on
Each komodo has a tiny brain: a handful of numbers. It looks at five things (its height, its speed, the distance to the next pipe, how far the gap is above or below it, and a constant) and decides to flap or not.
Generation 1 gets random numbers, so most crash at once. The komodos that flew furthest become parents. Children mix their parents' numbers and get a few random nudges. Repeat until the 600 komodos are used up. Nobody ever writes the rule for when to flap.
The course starts with the same 150 pixel opening as Act 1 and loses one pixel per pipe, down to 90. A brain that only just scrapes through early pipes will not last.
This is a genetic algorithm training a neural network. You will meet both properly later in the course.