The Tower of Hanoi and the Tower of London are two distinct puzzles that are often mentioned together because they share a similar disk-and-peg appearance. The Tower of Hanoi is a classic three-peg mathematical puzzle introduced by Édouard Lucas in 1883, where the goal is to move an entire stack of disks from a Source peg to a Target peg using only legal moves, with a verified minimum of 2 raised to the number of disks, minus 1 moves. The Tower of London is a separate planning task developed later for cognitive research, where a fixed target configuration must be reached within a small, predetermined move budget rather than against an open-ended mathematical minimum. Both tasks look similar on screen, with labelled pegs and disks in different sizes, but the rules, the optimal solution model, and how results are scored differ significantly. This article explains those differences, points to the verified minimum-move formula for the Hanoi puzzle, and shows how to play the Hanoi version online using a browser Tower of Hanoi tool with three, four, or five disks.

tower of hanoi vs tower of london
Tower of Hanoi vs Tower of London: Key Differences

What the Tower of Hanoi Is

The Tower of Hanoi puzzle was introduced by French mathematician Édouard Lucas in 1883 under the name La Tour d'Hanoï. The puzzle uses three pegs of equal height and a stack of disks arranged in descending size order on the Source peg, with the largest disk at the bottom and the smallest disk at the top. The player must move the full stack to the Target peg while obeying two rules: only the top disk of any peg may be moved at one time, and a larger disk may never be placed on top of a smaller disk. Those rules and the minimum-move formula are reference facts rather than decorative copy. The NIST Dictionary of Algorithms and Data Structures documents this recurrence, and Stony Brook University's recursion guide walks through the same derivation independently. Together those references pin the formula to a stable, externally authored source rather than a self-computed answer. The verified minimums for three, four, and five disks are 7, 15, and 31 moves, and the broader golden values for one through eight disks are 1, 3, 7, 15, 31, 63, 127, and 255.

What the Tower of London Is

The Tower of London puzzle was introduced by Tim Shallice in 1982 as a planning task for cognitive research. The visual layout is similar, with three pegs of equal height and a small number of disks, but the rules differ in two important ways. First, the Tower of London task starts with the disks already distributed across the pegs in a specific starting arrangement and asks the player to reach a specific target arrangement shown alongside. Second, the Tower of London typically imposes a fixed move budget, often set near the optimal number of moves for that specific start-target pair, and the player scores by solving the puzzle within that budget rather than by reaching a single mathematical minimum that applies to every configuration. The Tower of London is widely used in neuropsychological assessment because the move-budget constraint lets researchers separate planning efficiency from raw move count. That difference is why the two puzzles keep appearing side by side in planning research rather than being treated as the same task with a different name.

Side-by-Side Comparison

The clearest way to see the gap between the two puzzles is to line up the rules, scoring model, and source of the optimal-move value side by side.

FeatureTower of HanoiTower of London
Origin year1883 (Édouard Lucas)1982 (Tim Shallice)
Starting layoutFull stack on Source pegDisks already split across pegs
Number of pegsThreeThree
Typical disk countThree to eight (open range)Three (task-defined)
Move ruleOnly top disk, larger never on smallerOnly top disk, larger never on smaller
Optimal-move sourceMathematical formula 2 raised to n, minus 1Task-specific, depends on start and target
Scoring modelCompare move count to verified minimumCompare to a fixed move budget per trial
Typical useRecreational puzzle, recursion teachingPlanning and executive function research

The move rule is the only row where the two puzzles behave identically. Every other row reflects a different design goal: the Hanoi puzzle is built around a clean mathematical optimum, while the London puzzle is built around a constrained planning window that researchers can adjust per trial.

Why the Two Puzzles Get Compared

The two puzzles look similar enough that researchers have repeatedly asked whether they measure the same thing. A 2007 study of young children treated the Towers of London and Hanoi as equivalent measures of planning and compared performance between them, finding that the two tasks produced overlapping but not identical scores. A 2000 paper asked whether the nonshared variance between the two tasks was due to differences in task administration rather than to the puzzles themselves, again finding measurable differences that survived across administration styles. The recurring finding is that the puzzles are not interchangeable: Hanoi is a recursive minimum-move puzzle where every legal move sequence eventually produces a known mathematical optimum, while the Tower of London is a constrained-budget planning task where the optimal sequence depends on the specific start and target arrangements. Anyone who wants to experience the Hanoi side of that comparison can play three, four, or five disks in the browser and watch the verified minimum move counter update against the formula rather than against a human-chosen budget.

How to Play the Tower of Hanoi Online

  1. Open the Tower of Hanoi page, choose three, four, or five disks from the disk selector, and review the displayed minimum before pressing Start.
  2. Select a source peg by clicking its button or pressing the matching key (1, 2, or 3). The first selection only picks the top disk and does not increment the move counter.
  3. Select a destination peg by clicking its button or pressing the matching key. The destination must be empty or carry a top disk that is larger than the disk you are moving. Selecting the same peg again cancels the move, and selecting an empty source reports that there is nothing to pick up.
  4. If the destination has a smaller top disk, the move is rejected without changing the board or the move count, and the source peg stays selected so you can choose a legal destination instead.
  5. Move the full stack to the Target peg. When the final legal disk lands on Target, the game freezes and reports your total move count beside the verified minimum for the chosen disk count.
  6. Compare your move count only with the verified puzzle minimum for that disk count: 7 for three disks, 15 for four disks, and 31 for five disks.

The same guarded choice path serves clicks, taps, and the physical keys 1, 2, and 3, so keyboard play is not a separate mode. A deeper look at the optimal-move derivation is available in the iterative vs recursive Hanoi algorithm guide, which contrasts the two common ways to generate the 2 raised to n, minus 1 sequence.

Scoring and Final Result

Matching the verified minimum awards 1,000 points. Each additional legal move reduces the recreational point total by 20, with a floor of 100 points so no run can drop below a small fixed reward. The points are a product rule for the browser tool, not part of the classic puzzle source and not a rating of planning ability. Restart returns the board to the three-disk setup and clears all moves, and the shared shell may save a best local point value in the browser, but no attempt, move path, score, or identifier is uploaded to a server. When the final legal disk lands on Target, the game freezes and reports your moves beside the verified minimum, after which additional moves become atomic no-ops.

Choosing the Right Puzzle for Your Purpose

If the goal is to engage with the recursive minimum-move problem the way Lucas designed it, the Tower of Hanoi with three, four, or five disks gives a clean mathematical optimum and a visible comparison to the 2 raised to n, minus 1 formula. If the goal is to practice planning inside a constrained move budget against a fixed start and target arrangement, the Tower of London offers the right shape, but it is a different puzzle with its own scoring model. The two puzzles reward different skills and use different optimal-move definitions, which is why the comparison in the research literature keeps finding that they are related but not the same task.

Related reading: Can You Play Tower Stack Without Downloading? Yes.