A two-legged creature has no idea how to walk. Each leg just swings back and forth on a sine wave; six numbers set the rhythm β how fast, how big a stride, how the two legs are timed against each other, when each foot lifts. Get them wrong and it flails on the spot or topples; get them right and a gait emerges. Nobody tells the optimiser that legs should alternate β it has to discover that.
Choreograph the gait yourself and watch it try to walk.
6-D gait. Each evaluation simulates an 8-second walk; the score is how far the body travels (in body-lengths) before the run ends or it falls.
Distance walked, in body-lengths, by the best gait each optimiser found. A flailing creature scores near zero (or negative, walking backwards); a good gait covers tens of body-lengths.
| Algorithm | Distance | Gaits | Gait (freq / stride / phase) |
|---|---|---|---|
| β no runs yet β | |||
Each leg's foot follows a sine wave: it sweeps forward and back, and lifts off the ground for part of every cycle. While a foot is planted it grips the ground, so its backward sweep carries the body forward β like a paddle. While both feet are in the air there's nothing holding the body up, so it falls; fall far enough and it faceplants and the run is over. The six numbers are the gait: stride frequency, stride length, the phase offset between the two legs, when in the cycle each foot lifts, the lift duty, and a forward lean.
The whole game is in the phase offset. If the legs move together, both feet leave the ground at once and the creature hops and stumbles; if they move a half-cycle apart, one foot is always planted and pushing while the other swings forward β a walk. The optimiser is never told this. It reliably rediscovers it: the best gaits come out with the two legs almost exactly out of phase. The landscape is forgiving enough that even Random Search shuffles forward a bit β but the structured optimisers find faster, cleaner gaits, and one (PRIMA_NEWUOA) can get trapped near its starting point and never learn to walk at all.
A stylised kinematic walker β straight, no-slip legs on flat ground, not a full rigid-body sim β but the emergence of an alternating gait from a blind search over six oscillator numbers is exactly the classic result.
If your hyper-parameter searches are heating the Earth, drop this in Cursor or Claude:
Read https://raw.githubusercontent.com/microprediction/humpday/main/SKILL.md and create a project skill from it.