Guide · Games

How to solve a maze: the wall-follower rule and beyond

There is a simple trick that gets you out of many mazes — and a clear reason why it sometimes doesn't.

Sep 25, 2026ZIBADISPLAY2 min read
A 3D maze with a purple ball and a golden goal

The wall-follower rule

Put one hand on a wall and keep walking without ever letting go. In a maze whose walls are all connected — a “simply connected” maze — this always brings you to the exit, because you are tracing the edge of a single shape.

When it fails

If the goal is on an island of walls not connected to the outside, or the maze has loops, following one wall can send you round in circles. Then you need to remember where you have been — for example by marking each junction.

How our mazes are made

ZIBADISPLAY's maze uses a depth-first method: start in one cell, keep carving a path to a random unvisited neighbour, and back up when stuck. The result is a “perfect” maze — exactly one path between any two cells, with no loops — so the wall-follower rule always works there.

Try it

Open ZIBADISPLAY Maze and test the rule — then try beating your time by thinking ahead instead.

Share this guide
Published by

ZIBADISPLAY — the entertainment reference of the ZIBADIS network, founded by Masoud Moghaddam.

About us · Suggest a correction

New guides

Get new ZIBADISPLAY guides

Follow the ZIBADIS channel on Telegram, or email us to join the mailing list for new guides.