The puzzle consists of 3 pegs and n different size disks. Initially, all the disks are with the left peg and placed one over the other in the order of that the larger ones are under the smaller ones. The goal of the puzzle is to move all the disks from the left peg to the right peg under the following constraints: (1) only one disk can be moved at a time, and (2) No disk can be placed on top of the smaller disk.
This is the famous example used to demonstrate recursion algorithm in programming languages In this game, the number of disks can be between 1 to 14.
The game can be played in three modes:
1) Computer animation: The computer automatically moves the disks around to finish the game.
2) Computer move-by-move: The computer automatically moves the disks step-by-step under your control by clicking the "Next step" button.
3) Human move manually: you select and move the disks among the three pegs to complete the task.