Kaamkoby ICE

Maze

Guide the dot from the top-left corner to the flag at the bottom right. Every maze has exactly one way through.

Time0.0s
Steps0
Best–

Controls

Keyboard
Arrow keys or W A S D move one square. Hold Shift to run to the next junction.
Touch
Swipe on the maze to run to the next junction, or use the arrow buttons under it for one square at a time.

Your best score stays in this browser only. Nothing is sent anywhere. The game pauses when you switch tabs.

About the Maze game

Every round of this Maze game is a new maze, built in your browser the moment you press New maze. There are three sizes: 10 by 10 for a quick break, 16 by 16, and 24 by 24 for a proper walk. The walls are drawn fresh each time, so there is nothing to memorise. The timer starts on your first step, and your best time for each size is kept on this device.

If you get lost, Show the way draws the route from wherever you are standing to the exit. That round then does not count for a best time, which keeps the records honest.

How to play the Maze

  1. Your dot starts in the top-left corner. The flag in the bottom-right corner is the exit.
  2. Move one square with the arrow keys, W A S D, or the buttons under the maze.
  3. Hold Shift with an arrow, or swipe on the maze, to run along a corridor until the next junction or dead end.
  4. The squares you have visited stay shaded, so you can see where you have already been.
  5. Reach the flag to stop the clock. Press New maze for another one.

How the mazes are made

The generator is the recursive backtracker, a depth-first search. It starts in one cell, knocks down the wall to a random neighbour it has not visited, and keeps going. When it reaches a dead end it backs up to the last cell with an unvisited neighbour and branches from there. The result is a perfect maze: every cell can be reached, and there is exactly one path between any two cells, with no loops. The long winding corridors are typical of this method. The Show the way button uses breadth-first search, which explores the maze in rings of equal distance and is guaranteed to find the shortest route.

A way to never get lost

In a perfect maze like these, the wall follower rule always works: keep one hand on the same wall and walk. You will reach the exit, though rarely by the shortest route. It is slower than thinking ahead, but it is a good fallback on the large size.

Written from scratch by Imperial College of Engineering for Kaamko. No third-party code or art.

Last checked by Imperial College of Engineering. Played through on desktop and a 390px phone screen on this date.