Along this paper we propose a new algorithm for solving the Tower of Hanoi puzzle. We focus on computer memory efficiency by applying the Artificial Intelligence's method "Best-First Search". We develop the algorithm with detailed explanations, taking in mind it may be coded in any programming language. Furthermore, we set a heuristic function and several mathematical definitions, diagrams, and examples in order to make the reader understand fully. Finally, we present the solution implemented in python, adding proofs of its logical functioning as well as results about execution time made for 16 cases (from using only 3 disks until 18).
展开▼