Fledge

Watch a tiny brain learn to fly

A newborn neural network, about 3,400 weights, teaches itself to land a paper glider on the perch. It trains right here on your device, by trial and error, and the it expects is drawn on the chart.

A trained glider is flying the perch. Press Hatch to start from a blank brain.

Flight log

No updates yet.

What it expects

Waiting for the first flight.

What it intends

The picks actions; the predicts the future; keeps it trying new things.

How it's built

  • Reinforcement learning from scratchMultilayer perceptrons, backpropagation, Adam and PPO with GAE, written in TypeScript with no ML library. Every gradient is checked against finite differences.
  • Sixteen flights, one workerSixteen gliders train in a Web Worker while the page flies the newest policy at 60 fps. The same seed gives a bit-identical brain in Node and in your browser.
  • Predictions you can seeThe petals are the probabilities of its six thrusters, the dashed line is the path it imagines, and the contour rings are its value function, traced by marching squares.
  • It predicts its own futureEach flight starts with a guess of the reward to come. The panel compares that guess with what actually happened.