Question: Consider a robot that is placed in a room. The robot can: Move forward by one unit. Turn left or right. Sense
Consider a robot that is placed in a room. The robot can:
• Move forward by one unit.
• Turn left or right.
• Sense what is in front of it: a wall, a window, or neither.
Write an algorithm that enables the robot, placed anywhere in the room, to count the number of windows. For example, in the room at right, the robot (marked as R) should find that it has two windows.

[ R
Step by Step Solution
3.40 Rating (163 Votes )
There are 3 Steps involved in it
Here is one possible algorithm for solving this problem 1 Begin by facing the robot in any direction 2 Move forward until the robot senses a window or ... View full answer
Get step-by-step solutions from verified subject matter experts
