First steps

A small agent starts out knowing nothing. All it is ever told is how it did: a little reward for getting closer to the light, a bonus for reaching it, a penalty for falling into the pit. After every 32 tries it nudges its network toward the moves that turned out better than it expected. Slide through its training and watch clumsy turn into skilled. Every creature here is the real policy, running live.

REINFORCE with a baseline
policy 2 → 48 → 48 → 2, 2,596 numbers
10,240 episodes, seconds to train
exploration noise σ 1.00

Untrained. Its moves are noise, and it never finds the light.

Episode 0 of 10,240; in 1,000 test runs: 0% reach the light, 28.9% fall in, 71.1% run out of time

Untrained
Trained
This piece needs WebGL, which this browser has turned off.