Generate random mazes and solve them! Multiple difficulty levels with auto-solve.
Use arrow keys or WASD to move
Mazes are generated using the Recursive Backtracking (DFS) algorithm. This algorithm always creates a perfect maze with exactly one path between any two cells, guaranteeing a solvable puzzle.
Yes! Use the on-screen D-pad buttons at the bottom of the game area to play on mobile devices. The controls are optimized for touch screens.
The solution uses the BFS (Breadth-First Search) algorithm to find the shortest path from start to finish and highlights it on the maze. You can continue playing even after viewing the solution.
Best times for each difficulty level are saved in your browser's local storage. Your records will be available when you revisit on the same browser.
The Maze Generator & Game is an online puzzle game where you solve randomly generated mazes. Using the Recursive Backtracking algorithm, a unique maze is created every time, with three difficulty levels: Easy (15x15), Medium (21x21), and Hard (31x31).
Navigate the maze using keyboard arrow keys, WASD keys, or the mobile D-pad. Your step count and elapsed time are tracked, and you can challenge yourself to beat your best time for each difficulty. Use the solution feature to see the BFS shortest path.