Autonomous Maze Algorithm