Tower of Hanoi

About Tower of Hanoi

The classic Tower of Hanoi at night. Move the whole stack of lacquer discs to the lantern peg, one disc at a time, never putting a bigger disc on a smaller one. Play with three to eight discs, and ask for a hint that knows the fewest moves from wherever you are.

How to play

Tap a peg to pick up its top disc, then tap another peg to put it down. Only one disc moves at a time, and a disc can never sit on a smaller one.

Tips

  • The fewest moves for n discs is 2ⁿ − 1: 7 for three discs and 255 for eight.
  • Move the smallest disc on every other move, always around the pegs in the same direction.

Game details

Players
1 player
Plays on
Computers, tablets and phones
Controls
Mouse, keyboard or touch
Made by
Tobias Müller (GPTGames)
Price
Free, with no download or account

Credits

Tower of Hanoi was made by Tobias Müller (GPTGames) and is open source under the MIT licence. View the source code. We added a pause menu and made small changes so it runs well here; each changed file says what changed.