Maze solver that uses recursive backtracking