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.