First, implement an agent which uses A* search to make its decisions. In the directory ~echown/courses/370/search are a series of search routines which include A* (called best-first in the code). The demos directory includes a number of examples which you ought to find helpful. In particular demo4 which does A* search on the 8-puzzle should be especially useful for this project. Start out by implementing the vacuum world as a pure search problem.
It will probably be helpful to debug your search code on a relatively small (eg. 3X3) world. Once you have your code debugged and working, test it on progressively larger worlds. Keep track of the number of nodes expanded on average for worlds of different sizes and the total search time for those worlds (real time).
Suppose that you had to choose between the reactive agent you designed for the first program and the search-based agent you just created. Assume that the various actions that the vacuum takes take approximately 10 seconds in real time. (1) How large would the vacuum world have to be before the reactive agent started outperforming the search agent (assuming no furniture)? (2) What environmental factors will affect this tradeoff?
Given that the search agent always has more information than the reactive agent, it should always be able to outperform it. Suggest a strategy that would enable the search-based agent to do this. Now implement it. To do this you will need new versions of Percept.cc, Percept.hh and main.cc, all of which can be found in ~echown/courses/370/vacworld/lib In addition to the scoring provided, assume that there is a penalty for computer time spent on search along the lines of the tradeoff you determined already.
Finally, how would your solution change if the agent did not have constant access to the state of the environment? (3) In particular, what if the new perception information cost the agent an action? (4) What if the world changed with some probability X (e.g. new dirt appeared, or furniture changed location)?
As always your code should clearly explain what it is doing. In particular, clearly spell out the strategy used by your optimal agent. Remember, it should work in ANY sized environment, not just the sizes encoded in the program. Last updated TH Sep 24 21:20:38 1998 echown