Ghost Leg (Ladder)

The classic ladder game, also known as Ghost Leg or Amidakuji. Line up names against outcomes, shuffle the ladder, and follow each winding path to a fair random result.

How to use

  1. Enter participant names and the matching outcomes (prizes, penalties, or turn order).
  2. Shuffle the ladder, then tap a name at the top.
  3. Follow the winding path down to see the connected result.

A ladder draw is a set of vertical lines — one per participant — with rungs dropped between them at random. Each rung swaps you onto the neighbouring line, so every starting line maps to exactly one result and no two people can land on the same one.

In depth

Why ladders always produce a one-to-one result

Mathematically, a ladder (amidakuji) is a permutation. Every start maps to exactly one finish, guaranteed by the structure.

The reason is what a horizontal rung does: it swaps two adjacent vertical lines — a transposition. No sequence of swaps can ever send two people to the same place or leave a destination unreached.

Which makes ladders particularly good at distributing distinct things without duplication. Dice and wheels cannot guarantee that.

Is it actually fair

With enough randomly placed rungs, yes — every permutation becomes roughly equally likely.

Too few rungs biases it. With no rungs at all, everyone stays where they started; the fewer there are, the more likely you keep your original position.

Hand-drawn ladders are the risky case, because people unconsciously cluster rungs in particular regions.

This tool places enough of them, randomly. Increase the count if you want more mixing — but do not decrease it.

How many rungs to use

With N vertical lines, fewer than N rungs leaves too many people in their original position.

Two to three times the number of lines mixes thoroughly in practice — ten to fifteen rungs for five people.

Beyond that, fairness improves negligibly while the diagram gets harder to read; past a certain point all permutations are already near-uniform.

The default here sits in that range.

Stopping people reading ahead

A ladder's weakness is that tracing the lines reveals the outcome before choosing.

On paper this is handled by folding the sheet or covering the results.

This tool hides the rungs until after you pick and then animates the path, which removes the possibility of calculating a favourable position in advance.

Having everyone choose before anything is revealed makes it airtight.

Avoiding self-assignment

Secret Santa and similar schemes need assignments where nobody may draw themselves. Mathematically that is a derangement.

The probability that a random permutation has no fixed point converges to about 36.8% (1/e) regardless of group size — so two draws in three will assign somebody to themselves.

The practical fix is to redraw the whole thing when it happens. Two or three attempts usually succeed.

Swapping just the affected pair introduces bias, so redraw everything.

How it is computed

Rung placement and path tracing happen entirely in the browser. Participant names are not transmitted.

The randomness is a seeded pseudorandom generator — sufficient for drawing lots, not for cryptographic use.

Not suitable for official draws involving money; this is for social use and small assignments.

FAQ

Is the ladder game fair?

Yes. The horizontal rungs are shuffled randomly each time, so there's no way to know in advance which name leads to which outcome — every participant ends up connected to exactly one result.

Do I need the same number of names and outcomes?

Yes. Ghost Leg connects names to outcomes one-to-one, so both lists need to match in length.

Where does the name Amidakuji come from?

It's Japanese for 'ladder lottery' — the crisscrossing rungs resemble a ladder, which is also why it's sometimes called Ghost Leg.

Method and sources

What this tool bases its numbers on, and how far those numbers go.

What this tool is
A fair draw for deciding something socially. It uses the browser's ordinary random number generator, not a cryptographic one, so it is not suitable where someone has an incentive to game the result.
Formula
The ladder's rungs are generated randomly and each name follows its path down. Because the rungs are drawn independently, every one-to-one pairing of names to outcomes is equally likely — the ladder is a way of displaying a uniformly random permutation, not a separate mechanism.
Worked example
Five names and five outcomes have 5! = 120 possible pairings, and each comes up with probability 1/120. Which name you pick first changes nothing.
Limitations
  • Math.random is not unpredictable. The ECMAScript specification requires only an implementation-approximated uniform distribution, not cryptographic strength. Anyone determined to predict or reproduce a draw could.
  • Nothing is verifiable after the fact. There is no seed to publish or commitment to check, so this cannot prove to a sceptical participant that the draw was honest.
  • It only produces uniform outcomes. Weighted draws — one person twice as likely — are not what a ladder does, and drawing repeatedly until you like the result defeats the whole point.
  • For anything with money or a legal consequence attached, use a procedure the participants can audit, not a web page.
Effective date
Last reviewed

Related tools

  • Marble Race Roulette — Marbles roll down the board to pick a winner.
  • Team Splitter — Randomly split people into fair teams.
  • Plate Balance Game — Move the pole with your mouse and keep the plate up. Longest survival wins — settle a bet with it.
  • Darts Game — Throw at a real dartboard and play 01, Cricket or Count-Up against friends.