Docs


Rigid Road Walker

Fifteen jointed bipeds try to cross a rigid plank road full of holes and swinging wrecking balls. The GA evolves both the gait and the body shape so the right build survives.

Last updated June 3, 2026

Go to the live page Open the Rigid Road Walker demo

The 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, not just its movement, so the shape of the walker is part of 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 and short-legged ones drop straight in. 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. 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 crumples and falls off the road.

A "walker" reaches the far side when it travels at least seventy percent of the road length. 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

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; 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.

  1. Thigh length
  2. Shin length
  3. Body height (torso, short vs tall)
  4. Body width
  5. Foot length
  6. Head size and overall height
  7. 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 is a two-handle range slider too.

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.

What the achievement rewards

The first time a best-of-generation walker covers at least seventy percent of the road length, the Across the chasm achievement unlocks for signed-in users. On a typical road this is around seventeen meters of horizontal travel. 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.

Thanks for the feedback!