Tower of Hanoi is an online educational puzzle game that is very useful for children and adults as a simulator of analytical skills. Today, the game Hanoi Tower is used to teach recursive programming algorithms, but at the time of its invention in 1883, it turned out to be the most popular logic puzzle.
Meet the modern game Tower of Hanoi – play online and test your brain for flexibility! The rules are very simple: there are three rods, on the first one there is a pyramid of any number of disks. Move the whole tower to the opposite end, to the last stack. The online version of the Hanoi Tower puzzle can be played with 3, 4, 5 or 6 disks at the same time. The more of them, the more difficult.
How to play Tower of Hanoi
The transfer is subject to the following restrictions:
- only 1 disk is migrated at a time;
- you can take one of the upper circles of any tower and transfer it to any of the neighboring rods;
- the smaller element should cover the larger one.
The Tower of Hanoi game consists of progressively more difficult levels. The first stage begins with three disks that need to be moved to the right axis in a limited time (just over 1 minute). In subsequent levels, the number of disks increases by 1, and the time allotted for solving the problem also increases. The game can be continued from the saved place or start all over again.
Hanoi Tower algorithm
The simplest solution to the puzzle is to interleave the transfer of the smallest disks. If the initial number of disks is even, always moving the smallest disk to the right, if it is odd, to the outermost rod. For example, you started playing Tower of Hanoi with 3 circles. Move the smallest piece to the opposite end, and then continue to the left. Following this rule completes the puzzle with the fewest moves.
The inventor of the puzzle did not advertise his degree in mathematics, but he came up with an adventurous plot of the game, which gave motivation to play and guaranteed popularity.
According to legend, the design of the Towers of Hanoi from the game repeats an ancient relic in the Indian temple of Brahma – 64 gold discs of different diameters are installed on three racks, which together form a conical pyramid. Acting in accordance with the prophecy, the monks move the tower from the first rack to the last. With the last movement, the end of the world will occur – the Earth will be cleansed and a new round of the universe will begin. Today, tests based on the Towers of Hanoi are used to check the mental function of patients with brain injuries.
If the legend of the Tower of Hanoi puzzle is true, and the priests could move the disks at a speed of one per second, then, using the fewest possible moves, they could do it in 585 billion years!
And finally, advice: try to play such puzzles more often, they will help develop skills in concentration and logic. Even if you know the permutation algorithm, you still need to focus and get to the bottom of it. Ready to play Tower of Hanoi online – start now!