The Tower of Hanoi looks simple, but it is a brilliant exercise in forward-thinking and strategy. The goal is to move the entire stack of discs from the starting peg to the destination peg, using a third peg as a temporary holding spot.
Rules
You can move the discs around as much as you want, but you must strictly follow these three rules on every single turn:
One Disc at a Time: You can only move the top disc of any stack. You cannot grab a handful of discs or pull one from the middle.
Top Disc Only: A move consists of taking the top disc from one peg and sliding it onto another peg.
No Big on Small: You can never place a larger disc on top of a smaller disc. A smaller disc must always rest on a larger one (or directly on the empty board).
Strategy
To successfully move the stack, you have to break the problem down into smaller chunks. The sequence below walks you through the logical mindset needed to solve the puzzle, whether you have 3 discs or 30.
Clear the path for the base: Before you can move the largest bottom disc to your goal peg, you must move every single disc above it out of the way. If you have a 3-disc tower, your immediate goal is to get the top 2 discs over to the temporary middle peg.
Move the anchor: Once the largest bottom disc is completely exposed and your goal peg is empty, move that largest disc directly to the destination peg. It will now act as the solid foundation for the rest of your tower.
Rebuild the pyramid: Now, treat the remaining smaller discs as a brand-new, slightly smaller tower. Move them from their temporary holding peg back onto the top of the largest disc on the destination peg, maintaining the strict "small-on-large" rule.

