Wall follower trail BFS explored A* explored

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

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.