Maze routing
Routing
easy
interactive · in-browser
Maze routing (Lee's algorithm). This is the classic maze router, in its two real steps.
- Run the wave (expansion). Click Run wave: a wavefront floods out from the source, labelling every reachable cell with its distance from S and flowing around the grey blockages. The label on a cell is the length of the shortest path to it, so when the wave reaches the target its label is the shortest route length.
- Backtrace the path. Starting at the target, click your way back to the source, each step moving to a neighbour whose label is exactly one lower. That downhill walk is a guaranteed shortest path. Click the tip's previous cell to undo a step.
Because the path follows the wave's gradient, it is always shortest - there is no "drawing a wandering line". Run the wave, trace it back to S, then Submit design.