Solves mazes quite flexibly.