------------------------------------------------------------------------- HANDING IN INSTRUCTIONS * Turn in only the functions you modified for each problem. * Each problem solution should have a file associated with it such that when it is loaded on top of the basic vacuum environment the new environment solves the homework problem. * Each problem solution file must begin with ";Solution to by ." For example, ";Solution to 2.7 by Greg Grace." * Append all the files containinng solutions to programming assignments together and mail the appended file to greg@cc with the subject "Solutions to HW <#>." * Also turn in a hard copy of all code with example runs in class. * The introductory comments must contain instructions for running your code. -------------------------------------------------------------------------- GRADING POLICY Your code should contain a comment section at the beginning which describes the major components of your solution along with an explanation of why you chose to solve the problem the way you did. There should also be concise informative comments in the code. The comments for the grid-environment are a good example of about how much to comment your code, though their beginning comments are a bit weak and not formatted well. * 20 percent. For following instructions on handing in the homework and properly commenting the code. * 70 percent for a correct solution. * 10 percent for elegance and efficency. -------------------------------------------------------------------------- LISP RESOURCES Everyone should look at the Lisp Resources web site at http://eksl-www.cs.umass.edu/lisp-resources.html. This web page has many links that are helpful for learning and using Lisp, including one good one for reviewing Lisp: "Marty Hall's Learning Common Lisp Page". It also has a link to Guy Steele's Common Lisp book in HTML, " draft proposed ANSI Standard for Common Lisp." -------------------------------------------------------------------------- HELP WITH FIRST ASSIGNMENT First as Dr. Arkin wrote in the news group, the problem numbers refer to problems in the book. You must read the problems in the book. The instructions given in the assignment complement the problems in the book. With that out of the way, let's get started on the programming problems. The first thing you should do is print out the files that contain the code. Under the aima directory is the agents directory and the utilities directory. You should definately print out all the lisp source files in the agents directory and you probably want to print out all the lisp source files in the utilities directory as well. You can get away with not understanding the code in the utilities directory, but the agents code does use some of the utilities defined and some of the utilities will help you solve the problems, so you might want to refer to it while reading the agents code. The agents code is in 5 files: basic-env.lisp which defines the basic environment simulator. grid-env.lisp which defines the physical objects. vaccuum.lisp which defines the vacuum test.lisp which defines a macro for testing the vacuum and wumpus world. wumpus.lisp which defines a wumpus environment which we will not be using. You should read the first part of problem 2.5. It describes the way the vacuum world is implemented in vacuum.lisp. What follows is help for each of the programming problems. 2.7 You need to modify the function make-vacuum-world in vacuum.lisp. The easiest way to do this is to read the agents code into common lisp as specified in the assignment, then get the source for make-vacuum-world into an editor buffer, modify it, and then load it into common lisp. The modified version of make-vacuum-world will replace the original function. All you have to do is modify the default values for the parameters p, x-size, and y-size. Note that one of the functions defined in the utilities will help you generate a random number. 2.9 Notice that you are to write functions that are very similar to reactive-vacuum-agent. Your agents should remember the last state(s) of the agents--not their last grid locations. 2.11 You'll have to define an object for furniture. Look at the code in grid-env.lisp for examples of object definitions. To experiment with different room shapes, make an n x m rectangular room and fill in parts to get a new room shape. For example, to get an L shaped room fill in the top right hand portion. Notice that the code to move an agent checks if an object is of type obstacle, so you better make the furniture and whatever you use to fill in of type obstacle.