Robot Learning · 5 Interactives

Perfect in the Dream, Faceplant on the Floor

A policy that scores 100% in its simulator has mastered the simulator — not the world. Below, you'll train a little hopping robot in clean physics, deploy it onto a messy real floor, watch it faceplant live, and then fix it the way robotics labs actually do.

Train in sim Deploy to reality Exploit the bug Randomize the world Too much of the cure
EP 01

Nail it in the dream — training where physics is perfect

This hopper lives in a simulator with perfect grip, zero sensor noise, zero motor delay. Its policy has two knobs — jump power and forward push — and a hill-climbing trainer tweaks them, keeping whatever hops farther. Click Train a few times and watch the curve climb and the gait get aggressive. In sim, aggression is free.

Real hill-climbing over a real (toy) physics sim, running in your tab. Distances are measured from the simulation, not scripted.

Why labs love sim: a simulator gives millions of practice falls per hour, no broken hardware, perfect resets. OpenAI's Rubik's-cube hand and ANYmal's parkour policies all trained this way — the trap is what comes next.
EP 02

Now wake up — the same policy meets a real floor

Same trained policy, frozen. But reality has less friction than the sim assumed, noisy actuators, and latency between sensing and acting. Drag the sliders to set how unlike the sim your "reality" is, then deploy. The grip check below the canvas tells you, before it even jumps, whether physics will forgive the policy's habits.

This is the sim2real gap: the policy didn't get dumber — the world moved. Every real robot demo you've seen fought exactly this: DARPA challenge robots falling out of cars, quadrupeds slipping on grass their simulator never rendered. Find the friction value where the faceplants start — that cliff is the gap.
EP 03

The cheat code that doesn't exist — exploiting a simulator bug

Simulators have bugs, and optimizers are bloodhounds for them. This sim's contact solver has a classic one: slam into the ground hard enough and it ejects you forward — free speed. Train in the buggy sim and watch the policy learn to dive-bomb the floor on purpose. Then deploy it to reality, where hard landings just… break you.

The rule: an optimizer doesn't learn physics, it learns your physics — including the wrong parts. Real examples are everywhere: locomotion policies vibrating limbs to farm solver energy, or gliding on self-collisions the engine forgot to penalize. Sim score went UP because of the bug; real score went to zero. The good case is boring: an honest sim transfers.
EP 04

Train in a thousand worlds — domain randomization

The fix sounds paradoxical: make the simulator worse. During training, re-roll friction, noise and latency every episode, so no single world can be memorized. The chart compares the one-perfect-sim policy against the randomized one across the whole friction range. Slide the marker and race them on any floor you like.

Both policies were genuinely trained in your browser when the page loaded — same trainer, same budget, only the training worlds differ. Curves are averages of 8 fresh runs per point.

Look at friction 1.0: the one-sim specialist beats the randomized generalist on its home turf — robustness costs peak performance. But left of ~0.6 the specialist is a corpse and the generalist keeps hopping. This is how the Rubik's-cube hand worked: randomize masses, colors, frictions until reality is just one more sample from training.
EP 05

Too much of the cure — when randomization kills learning

If some randomization is good, is maximum randomization better? No — and you can prove it here. The σ slider sets how wild the training worlds get. Train at σ 0, at 0.5, at 1.0, and compare the deployments on the same real test floor. At σ 1.0 two things break at once: the only policy that survives everywhere is a timid crawl, and evaluations get so noisy the trainer can't tell good from bad.

The real lesson of sim2real: randomization is a bet that reality sits inside your training distribution — wide enough to cover it, narrow enough to still teach. Labs tune these ranges obsessively (and increasingly automate it, e.g. "automatic domain randomization"). The gap isn't closed by honesty or by chaos, but by calibrated chaos.
Keep playing
Reinforcement Learning
Sparse Rewards
Put the only reward at the exit of a maze and the agent wanders blind. Run i…
Reinforcement Learning
Model Predictive Control
Drive a toy car with Model Predictive Control: watch candidate futures fan o…