Maze Runner generates a unique maze every time you play. The maze is created using a recursive backtracking algorithm that guarantees every maze has exactly one solution, no dead-end loops, and a solvable path from start to finish. Each maze is a square grid with walls represented by visual blocks and paths represented by open corridors. Your goal is to navigate from the starting position (top-left corner, marked green) to the exit (bottom-right corner, marked red) in as few moves as possible. You can move in four directions using arrow keys, on-screen buttons, or swipe gestures on mobile devices.
The maze generation algorithm works by carving a path through a grid of walls: it starts at a random cell, marks it as visited, then randomly selects an unvisited neighbor. If all neighbors are visited, it backtracks to the previous cell and tries another direction. This creates a perfect maze where every cell is reachable and there is exactly one path between any two points. The maze size adjusts to your device: smaller screens get an 8x8 grid, while larger screens get a 12x12 grid. The move counter tracks your efficiency, and the game compares your moves to the optimal solution length. A perfect score (matching the optimal path) is a true indication of spatial reasoning ability. Each solved maze gives you a star rating based on how close you came to the optimal solution.
Controls
Click/Tapto interact
Designed for both desktop and mobile play. Touch-friendly interface.
Strategy Guide
Maze Runner generates each maze using a recursive backtracking algorithm guaranteed to produce a solvable maze with exactly one path between start and finish. The minimum 3-second clear time on easy mode ensures even speedrunners have a baseline challenge. The optimal strategy is the right-hand rule: keep your right hand on the wall and never let go — this guarantees completion of any simply-connected maze in O(n) time where n is the number of cells. The advanced timer mode adds a countdown that decreases faster in dead ends, penalizing wandering. The maze size increases from 8x8 (easy) to 16x16 (hard), which increases solving time from ~15s to ~120s for an average player. Each cell is uniquely generated, meaning no two plays will see the same maze layout. The trail feature shows your past path as a dim outline, helping you identify recently visited dead ends.
Play Tips
The right-hand rule (keeping your right hand on the wall) guarantees completion of any simply-connected maze but is not the fastest approach. For speed runs, use the Pledge algorithm: pick a direction and follow it until you hit an obstacle, then pick the next direction clockwise and continue. This is about 30% faster than wall-following on average mazes. The 8x8 easy maze can be solved in under 10 seconds with the Pledge algorithm. For the 16x16 hard maze, use wall-following since dead ends are longer and the guarantee matters more than speed.
Technical Note
Technical note: maze generation uses recursive backtracking (iterative implementation to avoid stack depth issues) with randomized neighbor selection for each cell. The algorithm guarantees exactly one path between any two cells. Timing tracking uses performance.now() for sub-millisecond precision. The trail rendering uses a secondary canvas layer with reduced opacity for the faded path, composited over the main maze layer.