Move all disks to peg C, one at a time. You can never place a larger disk on a smaller one — and the required planning depth grows exponentially.
Select a difficulty. Move all disks from peg A to peg C.
Click a peg to pick up its top disk, click another to place it.
The Tower of Hanoi is one of psychology's most studied tasks for measuring executive function — the set of mental skills used to plan, focus, and juggle multiple pieces of information at once. Solving it requires recursive planning: to move n disks, you must first solve the n−1 sub-problem, which requires solving the n−2 sub-problem, and so on.
| Disks | Min Moves | Planning Depth | Working Memory Load |
|---|---|---|---|
| 2 | 3 | 1 level | Low |
| 3 | 7 | 2 levels | Moderate |
| 4 | 15 | 3 levels | High |
| 5 | 31 | 4 levels | Very high |
| 6 | 63 | 5 levels | Extreme |
| 7 | 127 | 6 levels | Near-maximum |
John Sweller's Cognitive Load Theory (1988) explains why performance degrades sharply above 4–5 disks: working memory can only hold ~4 items at a time (Cowan, 2001). Once the sub-goal stack exceeds this limit, people must offload to trial-and-error, dramatically increasing move count and errors.
The task is used clinically to assess frontal lobe function, planning deficits in ADHD, and cognitive decline — because it isolates pure planning ability from domain knowledge.