Tower of Hanoi

Number of Disks
Disks Calcluated:
Calculation Time: 0ms     Total Time: 0ms
Move top disk to
Use Generated Results
Steps Completed:
The tower of Hanoi is a mathematical game where the goal is to move a tower of disks of different sizes from one rod to another rod. It can be solved using recursion. The least number of steps required to solve the puzzle with n disks is 2n-1. The interactive portion is run with p5js in your webrowser while the solution solver is run with python in an AWS Lambda server
Objective: Move tower from A to B
    • Use the buttons under each tower to move the top disk to another stack
    • Run Button: Get steps for solution
    • Auto Button: Runs steps in results box
    • Reset Button: Resets tower to stack A
    • Next Step Button: Runs next step from results box
    • Only one disk can be moved at a time
    • Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack
    • No disk may be placed on top of a smaller disk
Best Solution for n Disks: 2n-1 moves