Tower of Hanoi is a classic mathematical game. It consists of three rods (ie. our version may consist of three to four rods) and a few discs of different sizes which can be moved onto any rod. The puzzle starts with the discs in a stack in ascending order of size on one rod, the smallest at the top and the largest at the bottom, thus making a conical shape. The goal is to move the entire stack to another rod, obeying the following rules:
1. Only one top most disc can be moved at a time.
2. Each move consists of taking the top most disc from one of the stacks and placing it on top of another stack.
3. No larger disc may be placed on top of a smaller disc.
With N discs, the puzzle can be solved in no more than 2^N - 1 moves.