Question: Consider a robot that has been placed in a maze. The right-hand rule tells you how to escape from a maze: Always have the right
Consider a robot that has been placed in a maze. The right-hand rule tells you how to escape from a maze: Always have the right hand next to a wall, and eventually you will find an exit. The robot can:
• Move forward by one unit.
• Turn left or right.
• Sense what is in front of it: a wall, an exit, or neither.
Write an algorithm that lets the robot escape the maze. You may assume that there is an exit that is reachable by the right-hand rule. Your challenge is to deal with situations in which the path turns. The robot can’t see turns. It can only see what is directly in front of it.
Step by Step Solution
3.46 Rating (166 Votes )
There are 3 Steps involved in it
Come up with an algorithm to escape from any maze Write it down on paper Looking at your algorithm f... View full answer
Get step-by-step solutions from verified subject matter experts
