Level 3 ·●●○
Train Your Own
Play. Watch it learn from you. Step inside its dream. Let it plan.
Prerequisites: Levels 1–2. The heart of the site.
Everything so far was a warm-up. On this page a real neural network — three layers, about five thousand weights, implemented in the small library this site ships — will learn the physics of Bounce from you. Not from a dataset someone curated: from the moves you make in the next two minutes. Then you'll step inside its imagination and, finally, hand it the controls.
Four stages, each unlocking the next. Nothing is faked, nothing is pre-rendered; pull the network's code up at any point with “view the code.”
Stage 1 · Play
First, the world needs to be experienced. Experience is training data — the phrase everyone in this field repeats, made literal below. As you play, watch the counter: every single frame becomes a (state, action, next state) row in an experience buffer, like a lab notebook writing itself.
Stage 2 · Watch it learn
The network begins as a function with five thousand random knobs — its predictions are noise. Training is nothing more exotic than: predict, measure the miss, nudge every knob to miss less, repeat. You'll see the miss shrink two ways at once: as a falling curve, and as a prediction ghost tightening onto the real ball.
Stage 2 unlocks once you've played ~120 transitions above — the network needs your data (a starter buffer of 3000 scripted transitions is already waiting alongside it).
Stage 3 · The dream
Here is the moment the site is named after. Launch reality and the model's imagination from the identical state, feed them the identical actions, and watch. For a dozen steps they superimpose. Then a bounce lands slightly wrong in the dream, the error feeds back in, and the mistake compounds. Try the replay button right before a paddle strike — post-bounce is where dreams go to die.
Stage 3 unlocks after 300 training steps — the dream needs a trained dreamer.
Stage 4 · Plan inside the dream
The finale: model-predictive control. At every decision the planner imagines 20 candidate futures and plays the first move of the best one. The toggle decides where those futures are computed — inside real physics, or inside the network you trained. If the dream is good, the difference in skill should be small. Judge it yourself; the scoreboard is keeping receipts.
Stage 4 unlocks after the dream has run for a while in Stage 3 — let it drift first, then hand it the paddle.
Rewinds the network to its seeded initial weights and re-seeds the starter buffer (data seed 123, weight seed 7 — the exact seeds the verification script uses). Same seeds, same play → same model. Reproducibility isn't a luxury here; it's how you debug a dream.
What the numbers say, reproducibly
Your results above depend on how you played. For the record, this site's verification script (scripts/verify-model.ts) trains this exact architecture with fixed seeds on 12,000 scripted transitions for 3,000 steps and prints, every run:
- · backprop gradients match finite differences to a max relative error of 1.65e-8 (threshold 1e-5) — the calculus is right;
- · held-out one-step error of 0.001419 world units of ball position (threshold 0.005) — about 0.05 ball radii, on 2,000 transitions it never trained on;
- · dream-vs-reality divergence growing from 0.00229 at horizon 1 to 0.03615 at 10, 0.05715 at 20, and 0.22449 at 60 — compounding error, quantified;
- · MPC keep-up score of 29.3 planning in real physics vs 29.3 planning inside the dream — 100% of the real-physics score (threshold 60%), over episodes seeded 11, 22, 33.
No number in that list was typed by hand — the page imports the script's output. Run the script yourself and it will print the same figures.