Question: The vacuum world problem is revised to the following. a) The vacuum cleaner (i.e., agent) works in a rectangular room that consists of n n
The vacuum world problem is revised to the following. a) The vacuum cleaner (i.e., agent) works in a rectangular room that consists of n n grid of equally sized squares that agent may visit. b) The agent starts from cell (0,0). c) Dirty or Clean are marked on each square. d) The agent has definite movementeast, west, north, south.The layout of 3 3 grid is shown in the following.
The performance measure, i.e., the criterion for success, of an agents behavior is calculated by adding 50 points to the total for each clean square at the end of each time step and subtracting 1 point for each action taken. The vacuum cleaner does nothing once all the squares are clean. To sum up, the problem is formulated as follows. GOALS: (1) Traverse the room, (2) Clean up all dirt, and (3) Return Home and stop. INITIAL STATE: The vacuum cleaner starts from Home, i.e., cell (0,0), and random generated Dirt in certain cells. ACTIONS: Agent can perform the following limited actions: (1) turn Left, (2) turn Right, (3) go Forward, (4) Suck dirt, and (5) Stop, where do(Suck) for sucking dirt, go(Forward) for move forward one step, and turn(Left) or turn(Right) for turning at 90 degrees.
Implement the agent algorithm in Python and output the final state along with its performance score.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
