Maze Strategy · Comparison
Right-Hand Wall Follower vs. Trémaux's Algorithm (Maze Solving Compared)
Direct Verdict
The Right-Hand Rule is effortless and guaranteed to solve any 'simply connected' (spanning-tree) maze with zero memory, but fails if the goal sits on an isolated central island surrounded by loops. Trémaux's Algorithm marks passages on entry/exit and is mathematically guaranteed to solve EVERY finite maze—including looped islands.
Side-by-Side Matrix
Right-Hand Rule (Wall Follower) vs. Trémaux's Algorithm
| Dimension | Right-Hand Rule (Wall Follower) | Trémaux's Algorithm |
|---|---|---|
| Works on Simply Connected Mazes? | Yes — 100% guaranteed | Yes — 100% guaranteed |
| Works on Looped Mazes With Islands? | No — can loop forever around an island | Yes — 100% guaranteed |
| Requires Pencil / Chalk Marks? | No — zero memory needed | Yes — mark 1 line on entry, 2 lines on backtrack |
| Finds Absolute Shortest Path? | Usually not (explores dead ends) | Finds a direct path without loops (BFS finds shortest) |
| Try Live on Seeded Mazes | /printable-puzzles (all generated mazes are spanning trees!) | /guides/how-to-solve-any-maze |
Key Takeaways
What to Remember
- Every maze generated in our /printable-puzzles studio is a spanning tree, so both the Right-Hand Rule and Trémaux's Algorithm guarantee a solution.
- To find the mathematically shortest route on paper, combine backward-tracking from the exit with dead-end filling.
Frequently Asked Questions
Quick Answers
Does it matter whether you follow the right wall or the left wall?
No—both are mathematically equivalent as long as you never switch walls mid-maze.