BalanceForge · differentiable physics

The double pendulum, held upright by the model

Two model-based controllers on the SAME differentiable simulator — the physics you're watching. Gradient-free evolution (CMA-ES/NEAT) plateaus at ~13% hold on this task no matter the budget; both of these use the known dynamics and win.

LQR — holds foreveranalytic · provably stable
Neural — learns liveexact gradients · finite basin
starting…
backprop-through-time · ∂loss / ∂action across the rollout — which control moments the gradient blames. Only gradient methods can show this.
t = 0 (start of rollout)—t = end
LQR (analytic). Reads the linearized dynamics straight out of the differentiable simulator (finite- difference at the true inverted fixed point), then solves the discrete Riccati equation for a state-feedback gain u = -K·x. Provably asymptotically stable near upright → it holds indefinitely (verified 30s, no fall, from any small tilt). This is how real multi-pendulum rigs do it. Engine: js/diffsim_lqr.js (proof: diffsim-lqr-probe.js).