Amidakuji: the ladder lottery, and why it is fair

What amidakuji is

Amidakuji is a Japanese way of drawing lots, known in English as ghost leg. You start with one vertical line per person, add a scattering of horizontal rungs between neighbouring lines, and write the outcomes along the bottom. Everyone follows their own line downwards, crossing every rung they meet, and lands on exactly one outcome. The name is usually traced to the Amida Buddha, because early versions were drawn as lines radiating from a centre like the halo in paintings of him.

It survives because it is quick to draw on the back of a receipt and because the result feels earned. Watching a line wander across four other people before arriving at "buys coffee" is more fun than a number appearing on a screen.

How to read the ladder

  1. Find your name at the top and put a finger on the line under it.
  2. Move down until you reach a horizontal rung.
  3. Cross it. You are now on the neighbouring line. You may not skip a rung.
  4. Keep going down, crossing every rung you meet, until you reach the bottom.
  5. The box under the line you finished on is yours.

On this page you do not have to draw or trace any of that by hand: it is a ladder lottery generator, so pressing Start lays out the rungs for you. Tap a name and a marker rolls down the path in that person's colour, or press Reveal all to run everybody one after another. Shuffle draws a fresh set of rungs with the same names and outcomes.

Why nobody can end up with the same result

Each rung is a swap between two neighbouring lines, and a stack of swaps can only ever rearrange the lines, never merge two into one. So the mapping from people to outcomes is always one to one: every person gets exactly one outcome and every outcome goes to exactly one person. Two people cannot both draw the short straw, and no outcome is ever left over. The page checks this property on every ladder it builds.

There is a subtlety that most ladder tools ignore. A ladder with only a handful of rungs does not shuffle very well: the first line is far more likely to finish near the left than the right, so whoever is listed first would draw the first outcome more often than chance allows. This page fixes that by placing the outcomes underneath the lines in a random order of its own, which is why the setup card shows dashes rather than numbers next to them. With that extra shuffle every player has exactly the same chance of every outcome, whatever the rungs happen to look like.

Both the rungs and the outcome order come from the browser's cryptographic random number generator, and they are drawn only once you press Start. There is nothing to rig by reordering the names.

What people use it for

The coffee run
One "buys coffee" and everyone else "free coffee". The default setup on this page.
Chores and unpopular jobs
Write the actual tasks in the outcome boxes instead of marking one loser. Everyone leaves with something, which tends to go down better.
Turn order
Use the Order preset so the outcomes are 1, 2, 3 and so on. Useful for board games, code review rotas or who presents first.
Gift exchanges
Put the names in twice, once as players and once as outcomes, so everyone draws a person to buy for. The mapping is one to one, but nothing stops it handing somebody their own name — with six people that happens about six times in ten — so press Shuffle and draw again when it does.

Questions people ask

Can I see the result before choosing a line?

No, and it would not help. The outcomes are already assigned to lines before the ladder appears, so there is no "good" line to pick.

Does the number of rungs change the odds?

Not on this page. Because the outcomes are shuffled independently, every player has a one in N chance no matter how the rungs fall.

Is anything sent anywhere?

No. The names and outcomes stay in your browser. Nothing is uploaded and nothing is kept after you close the tab.