On October 13, 2026, @NeuralYogi posted a 22 second video: a single cart on a rail, a chain of ten pendulum links hanging from it, and one motor. The cart shuttles back and forth, the chain whips up link by link, and the final frames hold all ten links stacked upright, balanced. The post quotes @yacineMTB, who balanced six pendulums in June 2026 and called it a world first. This primer rebuilds the ladder from the bottom: one pole with its real equations, a single cart carrying as many poles as a slider can stack on it, and a learner that teaches itself in your browser. Then it is honest about what ten links actually demand.
Cartpole is the oldest test in reinforcement learning (RL): a pole hinged on a cart, one motor, and the job of keeping the pole up. It survives because it is the smallest system that is genuinely hard to control: unstable, underactuated, and honest, since the pole falls where everyone can see it. The sentence to remember: one pole is four numbers and a solved problem; every link you stack adds state and chaos, so the climb from one pole to ten is where a toy problem turns into research. Everything below runs the real thing, not a cartoon of it. Figure 1 integrates the standard coupled equations for one cart carrying many poles at once; the worked step and the learner use the exact equations and constants of Gymnasium’s CartPole, the standard implementation.
This is the system the title means: one long cart on one rail, with every pole mounted on that same cart, all of them driven by a single force. The physics is the standard coupled model, derived from the Lagrangian for a cart carrying N poles (point masses on light rods, each pole 0.1 kg, the cart 1.0 kg, gravity 9.8): one cart position, one angle per pole, and every step solves the whole coupled system at once, because accelerating the cart swings every pole and every swinging pole pushes back on the cart. The poles deliberately have different lengths, from about 0.4 to about 1.6 meters, so each one falls at its own natural frequency. One controller reads the cart and every pole together and pushes the cart with up to 20 newtons: a single linear state-feedback law, one force computed from the whole state, with a set of gains per pole count solved offline from the linearized coupled model (the footer gives the method, including where the clean solve runs out). Drag the slider: the count is real, the poles start at small random tilts, and there is exactly one cart and one force no matter how many poles ride it. In offline checks with this exact model and controller, 300 random starts (every tilt and spin up to 0.05, the Gymnasium range) held all ten poles up for a full minute zero times, the median start losing its first pole in about 0.8 seconds, while the same check at two poles held 300 times out of 300 and at three poles 120 times out of 300.
The motion is the data: one coupled integration, not an animation, and no pole has a motor of its own. Shove kicks the cart itself, so every pole feels it through the shared cart at the same instant. A pole that leans past about 37 degrees is counted as a topple and set back upright; the rest keep balancing through it.
Why one cart matters: copies are easy, coupling is the problem. Twenty four separate cartpoles would just be one solved problem photocopied; the trainer in Figure 3 uses parallel copies for gathering experience, which is a different trick. Here there is a single force for every pole on the cart, so each correction that saves one pole shoves all the others, and the varied lengths mean no two poles want the same push at the same moment. That is the whole difficulty of the ten pendulum video, in miniature: one input, many unstable riders, and nothing to hide behind.
In words first: the pole wants to fall, the cart can only push sideways, and the two motions are welded together, because pushing the cart swings the pole and the swinging pole pushes back on the cart. Gymnasium computes one shared term first:
Then the two accelerations, the pole first:
And the cart, which feels the pole push back:
The constants are Gymnasium’s: cart mass 1.0 kg, pole mass 0.1 kg, half-length 0.5 m (the pole is 1 m long), steps of 0.02 seconds, and an agent that may only push with +10 or -10 newtons. These are also the corrected equations: Razvan Florian showed in 2005 that the dynamics printed in the 1983 paper carried a sign error in gravity and a malformed friction term, and Gymnasium ships Florian’s form. Balancing a broom on your palm is the same physics at human scale: you cannot lift the broom back up, you can only move your hand under the part that is falling.
One pole’s arithmetic, one step of it, with nothing hidden. Figure 1’s shared cart solves all of its poles together in one coupled system each step; this is the single pole building block that system generalizes, and the same step the learner in Figure 3 lives on. The state is cart position 0.10 m, cart velocity 0.20 m/s, pole angle 0.10 rad (about 5.7 degrees), pole angular velocity -0.30 rad/s, and the push is +10 N to the right. Tap through.
Yes, and not as a metaphor: the training below runs entirely in this tab, on the same Gymnasium simulator as the worked step above. Figure 1’s controller cheats in the respectable way, since it was handed the equations. This learner is handed nothing but the score. Its policy is five numbers, four weights and a bias: push right if the weighted sum of the state plus the bias is positive, else push left. Training is evolution strategies (ES), the black-box method Salimans and colleagues at OpenAI proposed in 2017 as an alternative to gradient-based RL. Each generation makes 16 random perturbations of the weights, mirrors each one (plus and minus), scores all 32 candidates in the simulator, and shifts the weights toward whichever perturbations scored better. No gradients, no value function, nothing to differentiate.
Why a browser is enough, honestly: the state is four numbers, an episode is at most 500 steps of a few dozen arithmetic operations, and there is no rendering inside the training loop, so a generation costs 32 short episodes and a few milliseconds. When this exact algorithm was test-run outside the page, its average return climbed from 9 to 494 in 7 generations, about 250 episodes. Press Train and watch yours; the dashed line on the chart is Gymnasium’s solved bar, an average of 475. What does not scale, also honestly: swap the four numbers for camera pixels and the input becomes tens of thousands of numbers needing a convolutional network, episodes lengthen, and the sample count jumps from hundreds of episodes to millions of frames, which is why Atari agents were trained on clusters. Long horizons strain ES too, since a whole episode collapses into one number. And ten links would break this learner outright: five weights cannot express the corrections a 22 number state needs.
Untrained: the demo cart runs the current weights, which start at zero, so it shoves one way and falls. Training updates the weights generation by generation, and the demo cart always runs the newest ones.
Tap the card, swipe, or use the arrows.
Positions as of October 2026, each attributed to its source.
One pole is a solved problem twice over: control theory derives the answer from the equations, and learning finds it from a score, in a browser tab, in seconds. The ten-pendulum video is the same task with the volume turned up until both answers strain: the state grows to 22 numbers, chaos erases prediction, and the proven way up is a good environment and a great deal of practice.
Built from the sources above. The trainer and the worked step are independent implementations of Gymnasium’s CartPole dynamics, with constants and equations taken from the Farama Foundation’s source code. Figure 1 is an independent implementation of the standard coupled model for one cart carrying N poles (the Lagrangian system for point mass poles on light rods, pole lengths spread from about 0.4 to about 1.6 meters). Its controller is one linear state-feedback law per pole count, force capped at 20 newtons, gains solved offline from the linearized coupled model (discrete Riccati equation, angle errors weighted 40 times position error, R = 0.1): plain double precision at one and two poles, extended precision at three to eight poles, where the coupled Riccati solve is already too ill-conditioned for ordinary doubles, and a weighted blend of the per-pole LQR designs above eight poles, where the coupled solve stops converging altogether. The same code was run offline before shipping: 300 random starts per count (tilts and spins to 0.05) held every pole for a full minute 300 times at one pole and at two poles, 120 times at three poles, and 0 times at ten poles, where the median start lost its first pole in about 0.8 seconds. The one pole gains quoted in the cards were computed with scipy (continuous Riccati equation, weights Q = diag(1, 1, 10, 1) and R = 0.1). The evolution strategies trainer was test-run outside the page before shipping and reached an average return of 494 in 7 generations. The ten-pendulum video is described from frame by frame inspection; @NeuralYogi does not state the method or compute behind it, and @yacineMTB’s “world’s first” for six pendulums is his own claim, not independently verified. Nothing on this page talks to a server: all training happens in your browser.