Dan Turkel


Weekend Projects


In eighth-grade math class, I would play a version of the Towers of Hanoi puzzle on my TI-84 calculator while I was supposed to be paying attention to trigonometry. I eventually developed enough muscle memory to quickly beat the puzzle in the minimum number of moves for up to 7 discs.

A little over a decade later, I wrote pynoi to speed up my solving a bit more. Pynoi uses a recursive method to solve Towers of Hanoi in the minimum number of moves. It can solve a 24-disc puzzle in 16,776,215 moves in about 22 seconds on my Macbook. You can use it to solve the puzzle manually too. [Github]