The Towers of Hanoi

The goal of this game is to move the tower you see on the left to either of the other two poles. At the end, the tower must look exactly as it does in the beginning, with the largest disk on the bottom and progressively smaller disks on top. You are allowed to only move one disk at a time. You are not allowed to place a larger disk on top of smaller one. You must always move the top disk from a given Tower.

Once you've decided which disk you want to move, click on that disk. Then select a destination tower to move the disk to that tower. If you try to move a disk on top of a smaller disk, you will receive an error message.

You can play the game beginning with any number of disks between 3 and 7. We suggest starting at 3 and proceeding upwards. You can change the initial number of disks using the slider at the right. The goal is to reconstruct the Tower in as few moves as possible. You should see a pattern in the minimum number of moves as you increase the number of disks. The number of moves you make is recorded below the Towers. You may start again by clicking on the Reset button. Have fun.

Back to the Towers of Hanoi.

Created by Rodin Enchev.

For comments and suggestions write to Robert L. Devaney at