Play a free maze game: steer a round character from the start to the flag through a fresh maze, from 8x8 up to 24x24, with a trail and a hint.
Moves 0
Shortest way -
Time 0:00
Your best -
This maze is wider than the space on this screen, so it is at its smallest size. Scroll the board sideways to follow the player.
Find the way from the dashed ring to the flag. Walls block you. Arrow keys or W, A, S and D step one cell; hold Shift with a key, or swipe on the board, to run along a corridor until the next fork. The buttons under the board step too, and repeat if you hold them. H or the Hint button shows the next step. A best score only counts if you did not use a hint.
A maze is carved by a random walk that never enters a cell twice: it knocks down a wall to a new neighbour, and when it is stuck it backs up to the last cell that still has an unvisited neighbour. That makes every cell reachable and leaves exactly one route between any two cells, so there are no loops.
The flag is placed in a cell as far from the start as any other, measured in steps. The Shortest way figure is that distance, and the hint follows it.
As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.
You are the round orange character with two eyes. Start at the dashed ring in the top-left corner and reach the flag in its glowing circle. Walls block you. Every maze has exactly one way through, so a wrong turn is always a dead end you can back out of.
Choose a size from 8x8 up to 24x24 and press New maze for another one. Restart puts you back at the start of the same maze.
The Shortest way figure is how many moves the best route needs. Your best is the fewest moves you have used on a maze of that size without a hint. Backing out of a dead end counts as moves too.
The page address holds the size and the maze number, so you can share the exact maze. After each move the page says what you did and which directions are open from where you stand, and the flag’s direction is announced at the start. Walls, the flag, the start and the trail each have their own shape as well as a colour: the flag is a flag, the start is a dashed ring, your trail is a line and your visited cells are dots. Under reduced motion the character no longer glides and the finish bounce is switched off.
Making the maze. A random walk starts in the top-left cell. At each step it picks a random neighbour it has not visited, knocks down the wall between, and moves there. When every neighbour has been visited it backs up to the last cell that still has an unvisited neighbour, and it ends when it is back at the start. Every cell is visited exactly once as a new cell, so the open passages form a tree: n x n cells joined by n x n - 1 passages with no loops. The code uses an explicit list of cells to go back to rather than recursion, so the biggest maze cannot run out of stack.
Where the flag goes. A breadth-first search from the start measures how many steps every cell is away. The flag goes in a cell with the largest distance. That number is the Shortest way figure, and the hint walks the shortest route found by the same search.
Running. A run follows the corridor you are in: if there is exactly one way forward other than back, it takes it, even round a corner. It stops at a fork, a dead end, a wall, the start or the flag.
Nothing is uploaded and there is no account. Your best move count for each size is saved in your browser as a small whole number inside a small JSON object. Clearing site data removes it.
For informational purposes only. Not financial, medical, or legal advice. You are solely responsible for how you use these tools.