01The game
One button: flap. A bird flies through 150 gaps between stone towers. Hit a tower, the floor or the ceiling and the game ends. Every course has three levels, and the score is the number of gaps passed.
The networks see six numbers: the height to the next gap, their own vertical speed, the distance to the next tower, the height to the gap after that, the gap size, and how fast the gap is moving. Smaller networks see fewer of them. The game is deterministic: the same course and the same flaps always give the same game.
02Play it
Press Space, click or tap to flap. The leaderboard course is the same for everyone, and the networks' scores on it are listed alongside yours.
03How the networks learned
Four networks, from a single neuron with 3 numbers to two layers of 16 neurons with 401 numbers. Each was trained twice, with the same budget of game frames.
The network flaps at random, in proportion to its output, and is rewarded for each gap passed and penalised for crashing. PPO nudges every weight towards the flaps that paid off. Three additions: a curriculum (60% of games start at a random gate, so the hard levels are practised early); an exploration bonus that fades to zero, so the network ends up decisive; and the best checkpoint on the practice courses is kept.
40 random networks each play three courses. The best eight are kept and crossed with each other, with random mutations, and this repeats for many generations. No gradients: this is the approach of the classic open-source browser demos of this kind of game.
04How Claude edited them
Claude read each trained network's weights, worked out what was going wrong, and changed specific numbers by hand. It used no training, at most 10 evaluations on the 50 practice courses, and the 1,000 test courses only after an edit was kept. Step through each session below, including the tries that made things worse.
Each square is one situation: up/down = the bird's height relative to the gap centre, left/right = rising or falling. Blue = the network flaps there. Squares outlined in white are decisions this edit changed.
05Race
All four networks fly the same course at once, to the end of the game. ✕ marks a crash and the level it happened in; ✓ marks a finished course.
Under "+ Claude's edits", a network with no kept edit flies as trained.
06Results
Average gates (out of 150) on 1,000 test courses. None were used for training or for choosing edits.
▲/▼ is the change from Claude's edits, against the same network as trained. Hover a cell to see how many courses got past each level.
07Watch any network
Pick a network and a test course. The diagram shows what each neuron is doing, frame by frame.
Node colour shows each neuron's current activity: blue = positive, orange = negative, grey = near zero. The network flaps whenever its output is above zero.
Wingbeat is an original game made for this page. The idea of small networks learning a one-button flying game comes from the open-source neuroevolution demos. Method from Takehi, Teoh, Zhang and Khattab, “Weight-Space Programming” (2026).