Explores in rings. A queue guarantees the shortest hop-count path when edges cost the same.
Scroll through the story — then tap simulations before you ever open the labyrinth.
A maze is a network of choices. Each step commits you to a corridor; dead ends force retreat. Games teach intuition — algorithms teach exactly how escape is computed.
Every walkable cell is a node; every legal step is an edge. Solving the maze = finding a route in that graph — from START to EXIT.
Hover the highlighted algorithm names to see queue, stack, and priority queue in motion.
Explores in rings. A queue guarantees the shortest hop-count path when edges cost the same.
Dives deep first. Uses a stack — watch backtracking when paths dead-end.
Each corridor has a cost. A priority queue expands the cheapest frontier first.
The same miniature maze runs BFS (left) and DFS (right) side by side. Drag the slider to change step delay — BFS grows in layers while DFS snakes and backtracks.
Click cells to place START then EXIT. Run any solver — instant visualization on a living maze.