Rigid Road Walker
Fifteen jointed bipeds try to cross a rigid plank road full of holes and swinging wrecking balls. Every walker shares the same built-in stride; the GA evolves the body shape so the right build survives.
Go to the live page Open the Rigid Road Walker demoThe Rigid Road Walker demo gives the genetic algorithm a hard locomotion problem: take a small biped, drop it onto a plank road, and have it walk to the far side. The road is rigid: it does not sag, sway, or bounce, so getting across is purely a test of how the walker is built and how it moves, not of luck from a springy surface. Parts of the deck are missing, and heavy wrecking balls swing across the path. The twist here is that the GA evolves the walker's body rather than its movement: every walker shares the same stride, so the shape of the walker is the answer.
The Problem¶
A plank road stretches between two cliffs. It is a rigid deck of wooden boards fixed at a constant height: it never moves, so a walker that stays on solid boards has firm footing. Each walker is a jointed human figure: head, torso, two arms, and two legs with feet. Every figure already knows how to walk, with the same smooth, built-in stride, so the walk is always clean. What the genetic algorithm changes is the body itself: leg length, height, width, foot and head size, and how upright it stands. Those proportions decide how far it strides and how tall it stands, and that is what gets it across or gets it killed.
Two hazards sit between the walker and the far side, and you can tune both from the settings panel:
- Holes. Runs of planks are missing. A walker strides across a hole only when its legs are long enough to reach the far side, so long-legged builds clear wider holes. A walker that can't make it steps out as far as its stride reaches and drops in there, so a longer stride still gets a little farther. You set the shortest and widest a hole can be; each hole is randomly sized inside that range when you reset, and keeps that size for the whole run.
- Wrecking balls. Heavy weights swing across the deck on chains hung from a steel gantry. A longer chain hangs the balls lower, so a tall walker is clipped while a short or low-standing one passes under. A struck walker is thrown the way the ball is swinging, then lies where it lands or drops through a hole into the river below.
A walker solves the road when it reaches the far cliff. Anything else is a fall or a knockdown.
Because the genetic algorithm reshapes the body, body type decides everything. Long legs reach across the holes but raise the head into the balls; a low, compact build ducks the balls but needs legs long enough to still span the holes. Over the generations the population reshapes toward the build that threads both hazards, often long legs on a low frame.
How a Run Looks¶
The whole course stays in view, from the start line on the left cliff to the far cliff, with distance markers every four meters along the deck, a chequered Finish flag at the far end of the road (the goal), and an orange Best flag at the farthest point any walker has reached so far in the run. Each walker wears its own colours so you can follow individuals, and the current leader has a small arrow over its head. Turn off Show all walkers next to the Start button to draw only the best one.
Click Start. Fifteen walkers step out from the left edge at the same time. They don't collide with each other (we want each one's run scored on its own build and pacing, not on collisions), and they all share the same rigid road, so every walker faces exactly the same holes and wrecking balls.
Generation zero is mixed. Some walkers stroll straight into the first hole, others wander under a ball at the wrong moment and get swept off. After several generations a few settle into a build and a pace that clear the holes and slip between the wrecking balls, and they start crossing.
The platform evolves the population on the server. Four elites carry over unchanged by default (you can lower this in Settings, but never below one, so the best crossing so far is never lost); eleven children come from tournament-of-three winners with uniform crossover plus small random nudges. The next round arrives a moment later and a few walkers go a little farther.
The Genome¶
Seven real numbers in [0, 1], each decoded into a body proportion. The walk itself is fixed and built in (legs alternating, knees bending on the step, arms swinging opposite the legs), so every walker always moves like a person. The genetic algorithm changes only the body, and the body is scaled onto that same walk.
- Thigh length
- Shin length
- Body height (torso, short vs tall)
- Body width
- Foot length
- Head size and overall height
- Posture (how upright vs low-standing it is)
Leg length sets the stride, and the stride sets how wide a hole the walker can step across. Height and posture set how easily a wrecking ball clips it. So these few body genes are exactly the levers that decide survival, and the search converges as the population reshapes toward the body that fits the road. If a run looks stuck, raise the Max generations slider and let it keep evolving.
You control the limits of each trait yourself. In Settings, under Body the GA Evolves, every trait has a range slider with two handles: drag them to set the smallest and largest value the GA is allowed to use for that trait. Narrow a trait's range to force a particular build (for example, pull the torso-height and leg-length maximums down to make the GA produce short bodies), then Apply to start a fresh run with those limits. The hole width under Road Difficulty is a two-handle range slider too. Road and body settings take effect on the next Reset and stay fixed for the whole run.
Fitness¶
The horizontal distance the walker travelled along the road before falling. Falling means it dropped more than three meters below the deck (into a hole or off the side) or got knocked off by a wrecking ball. Because a walker that falls short of a hole's far side drops in at the end of its stride, a longer stride scores more even before it can cross, and the population follows that toward legs long enough to make it. In our tests (24 runs on the default course), every run had a walker cross within the default 100 generations, the first at generation 9 in a typical run.
What the Achievement Rewards¶
The first time a best-of-generation walker makes it all the way to the far cliff, the Across the chasm achievement unlocks for signed-in users. That is just under twenty-four meters of horizontal travel, shown as Target in the stats bar. How long it takes depends on how harsh you set the holes and the wrecking-ball chains: a gentle road is solved in a few dozen generations, while a brutal one can take a few hundred.
For more on how the demos catalog works, see What the Demos Do.