Home▸Chaos & Dynamics▸Labyrinth Maze Walker: Wall-Follower vs BFS vs A* (2D)

🧩 Labyrinth Maze Walker: Wall-Follower vs BFS vs A* (2D)

2D maze lab: a fresh perfect maze is carved with a recursive-backtracker every time you regenerate, then three real pathfinding algorithms — right-hand wall-following, breadth-first search and A* — race across it live, each reporting its own explored-cell count and final path length.

Chaos & Dynamics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-labyrinth-maze-walker ↗ Open standalone

This 2D companion trades the 3D version's first-person corridor view for a bird's-eye read of the maze itself: a recursive-backtracker generator carves a genuinely new perfect maze on every regenerate, and three real pathfinding algorithms — a right-hand wall follower, breadth-first search and A* — solve it simultaneously so you can watch, cell by cell, why "always follow the wall" reliably finds the exit but rarely finds the shortest one, while BFS and A* provably do, at very different explored-cell costs.

⚙ Under the hood

2D maze lab with a recursive-backtracker generator and three live pathfinding solvers — wall follower, BFS and A* — each reporting explored-cell count and final path length.

maze generationrecursive backtrackerpathfindingbreadth-first searcha* searchwall follower

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)