Nodylus Automat/ons
All projects
In progressDesign & implementation4 min read

Maze Runner

A procedurally generated maze, solved by hand or by a real pathfinding algorithm — an homage to the Micromouse robotics competition, including Flood Fill, the algorithm real autonomous mice use.

Next.jsCanvas APITypeScriptProcedural generationGraph search

Why I built this

I wanted a maze demo that couldn't be faked — no maze designed ahead of time, no algorithm secretly already knowing the answer. Every maze here is generated fresh on the spot, you choose the start and goal, and every solving method actually has to work its way through whatever gets generated. It's a nod to Micromouse, a robotics competition running since 1972, where small autonomous robots race to the center of a maze they've never seen before, using only their own onboard sensors.

What it is

  • Manual play — pick a start and goal, then guide a mouse through the maze yourself with arrow keys, WASD, or on-screen buttons on mobile.
  • Automatic mode — watch a handful of different strategies solve the same maze on their own, with the search itself shown step by step before the final path is walked.
  • Blind vs. all-seeing mode — the real heart of the project. All-seeing mode shows the whole maze at once, the way most maze demos quietly assume you can. Blind mode only reveals the walls right around you (or the algorithm) at any moment, exactly like a real Micromouse robot's sensors — building its own understanding of the maze through actual exploration, not a shortcut.
  • Size and difficulty — three sizes and several difficulty levels, each one guaranteed solvable.
  • Classic Micromouse mode — matches the real competition's setup as closely as a browser demo reasonably can.

Difficulty isn't about more walls

My first instinct was "harder difficulty means more walls." That's actually backwards — a maze with exactly one path between any two points already has as many walls as it can possibly have. What actually changes between difficulty levels is how many extra shortcuts and loops get opened up. Fewer loops means a maze with one "true" path and lots of dead ends (harder); more loops means more forgiving alternate routes (easier). Every difficulty level is guaranteed to have a solution — there's no way to accidentally generate a maze with no way through.

Why blind mode is the real test

Some solving strategies assume they can already see the whole maze — running them "blind" would mean quietly handing them the answer and pretending otherwise, which is exactly the kind of shortcut this project exists to avoid. So blind mode is only offered for the strategies that are actually built to explore step by step and learn the maze as they go — the same way a real robot has to.

One of those strategies is the actual, historically standard approach real Micromouse robots use: it keeps track of how far every explored spot is from the goal, updates that as it senses new walls, and always moves toward a closer spot. In blind mode, it explores until it finds the goal once, then runs the fastest route it discovered along the way.

A simpler strategy — always turning the same direction at every fork — was also tested carefully rather than assumed to work. It turns out to work perfectly on mazes with no loops at all, but its success rate drops sharply as more loops get added and the goal sits in the center, since a loop can hide a whole area it will simply never wander into. That's a real, honest limit of that particular approach, not a bug — and the app shows it plainly rather than hiding a failed run.

What's next

What's live today covers generated mazes, manual play, several automatic strategies, and both blind and all-seeing modes. Looking ahead, I'd like to add an AI-driven player that has to explore under the exact same blind, step-by-step limits as everyone else — no peeking at the whole maze, no shortcuts. That's still on the roadmap and hasn't been scoped yet.