Optimal Path Maze
Can you find the shortest route? Compare your steps to the optimal solution and aim for 100% efficiency.
Generating maze...
A* Algorithm
The optimal path is computed using A* pathfinding. No route is shorter.
Efficiency Score
Your steps divided by optimal steps. Perfect navigation equals 100% efficiency.
Solution Overlay
After completion, view the optimal path overlaid on the maze to learn better strategies.
How to play
Reaching the goal is not enough here: the target is the shortest route. The counter shows your steps next to the optimal step count calculated by the A* algorithm on this 21×21 maze. When you finish, the shortest path is drawn on the maze so you can see where you took a detour.
Controls
Use the arrow keys or W A S D on a keyboard. On phones and tablets, use the on-screen direction pad below the maze.
Tips for solving faster
- Every maze here is a "perfect" maze with exactly one route. If you reach a dead end, go back to the last junction and take a branch you have not tried.
- Keep one hand on the wall: following the same wall all the time always leads to the exit in these mazes, even if it is not the shortest way.
- Look at the goal first and trace backwards from it. Long corridors near the goal often tell you which side of the maze to aim for.