DIVILLI

Tower of Hanoi

Move the whole tower without ever placing a larger disk on a smaller one

How to play

  1. The goal is to move the whole tower from the left peg to the right peg.
  2. Tap a peg to select its top disk, then tap another peg to move the disk there.
  3. Only one disk can be moved at a time, and it must always be the top disk of a peg.
  4. A disk can never sit on top of a smaller disk — only on a larger one, or on an empty peg.
  5. Use "Hint" at any time to see, for a few seconds, the next move on the shortest path to the solution — even if you have strayed from the ideal path before.

Example: with 3 disks, the shortest solution takes 7 moves and starts by taking the smallest disk straight to the right peg — starting with the middle peg would already take 8.

About this game

The Tower of Hanoi is a well-known exercise in planning and problem solving. Versions of it — and variants such as the Tower of London — are used in neuropsychological assessments of executive functions, such as planning and working memory.

The rule is simple (never a larger disk on top of a smaller one), but solving it in the fewest moves means thinking several steps ahead, not just the next one — the more disks, the more advance planning it takes.

Frequently Asked Questions

Is there a minimum number of moves to solve the Tower of Hanoi?

Yes. With N disks, the minimum number of moves is 2ⁿ − 1. For example: 3 disks = 7, 4 disks = 15, and 5 disks = 31.

Why is this game used in reasoning assessments?

Because solving it well takes planning the sequence in advance and holding that plan in working memory — skills related to executive functions.