🎲 Interactive Domain Randomization — sim-to-real

Two cart-poles balance under the same "real" world. The left uses a policy tuned only on the nominal simulator (aggressive, high-gain); the right uses a domain-randomized policy trained across a family of worlds (conservative, robust). Drag the sliders to shift the real dynamics — pole length, pole mass, control latency, sensor noise — away from nominal. At nominal both balance; as you shift, the nominal-only cart destabilizes and falls while the DR cart keeps balancing. Policies and cart-pole dynamics run live in your browser, no libraries. From sensor-fusion-lab.

Both carts start from the identical tilt each round — the only difference is the control policy. Falls auto-reset after a beat.

Shift the "real" world

nominal-only policy (θ-gain ≈ 80)
domain-randomized policy (θ-gain ≈ 35)
Drag a slider or hit Perturb the world.
Personal side project — fully synthetic demo. Honest trade-off: the DR policy gives up a little peak tightness (it uses lower gains, so at nominal it corrects a touch less crisply) in exchange for surviving a wide band of shifted worlds. Push the sliders far past DR's training range (latency ≫ 5, or extreme length/mass) and the DR cart eventually falls too — robustness is a band around what it trained on, not magic.