Towers of Hanoi (Game)

Twelve discs. Three towers. One deceptively simple challenge.

Towers of Hanoi is a classic mathematical puzzle that tests your logic, patience and ability to plan ahead. The objective is simple: move an entire stack of discs from the centre tower to either of the outer towers.

There are just two rules:

  1. Move only one disc at a time.
  2. Never place a larger disc on top of a smaller one.

Sounds easy? With five discs, the theoretical minimum is just 31 moves. With twelve discs, that number increases to an impressive 4,095 moves!

Play Towers of Hanoi

Challenge yourself to solve the puzzle in the fewest moves and shortest time possible.

The game opens in a separate browser tab.

Game Features

This browser-based version includes a few extras to make the classic puzzle more interesting:

  • 1 to 12 discs: Choose anything from a quick puzzle to a serious challenge.
  • Multiple control methods: Use your mouse, drag and drop, arrow keys or number keys.
  • Customisable colours: Experiment with different disc colour schemes.
  • Live statistics: Track your moves, elapsed time, solving speed and potential score.
  • High-score leaderboards: Compare your performance across different disc counts.
  • Automatic solver: Watch the computer find the shortest solution, even from a partially completed puzzle.
  • Adjustable solver speed: Slow things down to study the solution or speed things up.
  • Free Play mode: Continue moving discs after completing the puzzle.

Your preferences and high scores are stored locally in your browser, and leaderboard records can be exported or imported as JSON files.

Can You Beat the Minimum?

The minimum number of moves for a fresh puzzle is calculated using:

Minimum moves = 2ⁿ − 1

Where n is the number of discs.

For example, a three-disc puzzle requires at least 7 moves, six discs require 63 moves, and ten discs require 1,023 moves.

The game also rewards efficiency and speed, so solving the puzzle is only part of the challenge.

Ready to Give It a Try?

Start with a few discs, work your way up and see how far your patience takes you.

Free to play. No installation required.

Advertisements

Leave a Reply

Your email address will not be published. Required fields are marked *