A maze gets carved by recursive backtracking, then two ways of finding the way out
race through identical copies of it, one cell per turn. Breadth-first spreads evenly in
every direction; A* leans toward the exit. Both come back with the same route every
time — the only question is how many dead ends each opens first, and that swings a lot from
maze to maze. Hit Regenerate a few times and watch the margin move.
Breadth-first
first
Fans out evenly. No idea where the exit is.
ready
—cells opened
—route length
A* search
first
Same steps, but prefers cells that look closer to the exit.
ready
—cells opened
—route length
Race
turn0 / 0solved
×1.0
Your system asks for reduced motion, so animation starts off. Turn it on above if you want to watch.