Artificial Intelligence

Project #1: Vacuum Cleaner World

Due: February 2, 2006 by 12:29:59

Email your solution program to me by the due date.  Click here to create an email with the appropriate mail subject.  Please turn in a printed listing of your source code.

  1. (Based on question 2.10 and 2.12) Let's make a modification to Vacuum Cleaner World such that there are 36 rooms in a 6 x 6 grid.  The agent can go Up, Down, Left, Right and Suck dirt. 

    1. Implement a simple reflex agent with a randomized agent function.  That is an agent with "random" movement but is still reflexive.  Since it is reflexive, the vacuum will not know the "state" of its environment (i.e. the layout of the room) but can perceive if there is dirt in the current square and it has bumped into a wall.  Design and implement such an agent and measure its performance which is defined as the sum of the number of times the vacuum moves and the number of times the vacuum sucks dirt.  In your submission email, briefly discuss how many moves does it take to clean the room.  Note: you may have to create an "oracle" function to determine if the entire environment is clean and to stop the simulation.  Name your file vac_world_a.py.

    2. Using the same 6 x 6 environment, what happens if the environment becomes stochastic?  Modifiy your design and implement an agent where Murphy's law is applied.  25% of the time, the Suck action fails to clean the floor if it is dirty and deposits dirt onto the floor if the floor is clean.  Again, in your submission email, briefly discuss how many moves does it take to clean the room.  How does this roughly compare with your results in part A.  Name your file vac_world_b.py.