Suppose that an agent lives in a grid world of size 5 x 5 (for a total of 25 squares). The agent
has two sensors: a GPS sensor, which informs the agent of its current location on the grid,
and a camera sensor, which informs the agent of the color on the current square and the four adjacent squares. The agent, at each step, moves left, right, top, bottom. 24 of the 25 squares are safe, and one square (at location 4,3) is dangerous. The current location of the agent is safe.
a. If the agent is reflex-based, the safe squares are green, and the dangerous square is red, is it possible for this agent to follow a safe strategy that will always avoid the dangerous square? If yes, what is that strategy?
b. If the agent is reflex-based, and all squares (safe and dangerous) are green, is it possible for this agent to follow a safe strategy that will always avoid the dangerous square? If yes, what is that strategy?