Game Lab · Evolution

Boat crosses the river

Sixty little boats want to reach the dock on the other side. The river keeps pushing them sideways! Press Play.

How the best half did, round by round

Reached the dock (%)A challenge started

Checkpoints — the champion boat from each round. Tap to replay it on today's river.

How it works

Feel the river

Each boat has 5 feelers for rocks and logs, plus a sense of where the dock is and which way the water pushes.

A tiny brain

Those numbers go into a small brain that decides: how fast, and which way to steer.

Best boats win

Boats that reach the dock fast score most. Their brains are copied into the next round with small changes.

Change the river

Turn on a challenge. The old tricks stop working, so scores drop, until new babies find a way.

What just happened?

For grown-ups: what's really going on

This is neuroevolution of a small feed-forward network [11 → 10 → 2] with tanh units.

  • Inputs: 5 ray-cast distances to rocks and logs (closer = bigger), the sine and cosine of the angle to the dock relative to the heading, distance to the dock, the water + wind velocity at the boat, and its own speed.
  • Outputs: throttle and rudder. Boat physics: speed eases toward the throttle; turning is stronger when moving; the current and wind are simply added to the position each step.
  • Fitness: 2 + (time left) for docking; otherwise closeness to the dock, scaled down after a crash.
  • Genetic algorithm: 60 genomes; the top 8% are copied unchanged (elitism); the rest are children of the top quarter (30% uniform crossover), with Gaussian mutation whose size is spread from small to large across the babies.
  • Adaptation: a challenge is a distribution shift. The population has no memory of the old river, but its diversity plus selection quickly re-tunes the policy, which is why scores drop and recover. Measured in Node (best half, 3 runs): stronger current 97–100% → 37–91% → 95–100%; wind 85–99% → 42–85% → 95–100%.