Tower of Hanoi
The classic tower puzzle: move every disc to the golden rod, one at a time, never placing a larger disc on a smaller one. Choose 3 to 8 discs, with a stopwatch or a countdown. The discs are glass beads, and the stained-glass window in the background holds the 64 golden discs from the temple legend. With a gamepad, it vibrates when you set each disc down (harder for the big ones) and when you try a move that isn’t allowed.
3 discs · Stopwatch
- Moves
- 0 / 7
- Time
- 0:00
- Rod 1: 3, 2, 1
- Rod 2: empty
- Rod 3: empty
Turn your phone sideways to play bigger.
No gamepad: connect one and press a button so the browser detects it.
Controls and rules
- Gamepad: D-pad, left stick or LB/RB to choose the rod; A lifts the top disc and sets it down on another rod (↑ also lifts and ↓ sets down); B puts it back; X undoes; Start goes back to the menu.
- Keyboard (click the game first): ← → or A/D to choose the rod; Space or Enter lifts and sets down; 1, 2 and 3 pick a rod directly (1 then 3 moves a disc from the first rod to the third); Z or Backspace undoes; Esc goes back to the menu. F: full screen.
- Touchscreen or mouse: tap a rod to lift its disc and another to set it down, or drag it from one to the other.
- Move the tower to the golden rod one disc at a time, never placing a larger disc on a smaller one. With n discs, the minimum is 2ⁿ − 1 moves (7 with 3 discs, 255 with 8). Undo returns the disc, but it counts as a move.
- Three stars for the minimum, two for up to half as many again, one for more. The clock starts when you lift the first disc; in countdown, running out of time loses the game. The record (fewest moves, then least time) is kept for each number of discs and clock, and if you reload the page the game picks up where you left off.