There are four simple English algorithms for the Tower of Hanoi puzzle available on Wikipedia , but when I first solved the puzzle, I came up with an algorithm that is different from any of the solutions I have seen.
Wikipedia algorithms:
Of course, the results of the algorithms are the same, and they are really just different ways of thinking about the same thing, but I'm talking about simple English ways to describe the process.
My process is as follows:
- Never move the same tile twice in a row (obviously)
- Right Priority
- When moving right, go to the nearest pole to which you can legally move.
- When moving to the left, move to the farthest pole to which you can legally move.
..

These rules differ from other descriptions of the algorithm in that:
The initial stack can be placed on any of the three pillars and continue to work without any adjustment to the necessary rules. (Unlike solutions 2 and 3 and 4 )
You do not need to specify drives (unlike solutions 1 and 3 and 4 )
I tested this programmatically, and he always solved the puzzle in (2^n)-1, where nis the number of rings.
, , . - ? , , .