Homework #2 FAQ

Answers to various questions about Homework #2.


When is the project due?

The project is due at 11:59:59 on Friday, 10/9/98, contrary to the date in the homework specification.

How do I submit our project?

You should submit files containing your Lisp source with the extension .lsp. You should also submit a copy of the wumpus worlds you used to test your program, to give us examples of your file format. These files should have the extension .wumpus. Your files should be in UNIX format; you will have to FTP them from your Windows computer to a UNIX workstation to submit them. At the UNIX prompt, you should do the following, where world.wumpus is a file containing a sample wumpus world, and wumpus.lsp contains your source:

~/lisp> tar cvf wumpus.tar wumpus.lsp world.wumpus
~/lisp> gzip wumpus.tar
~/lisp> uuencode wumpus.tar.gz wumpus.tar.gz > wumpus.tar.gz.uu
~/lisp> mail -s "Lisp: Homework #1" flynnk@rpi.edu < wumpus.tar.gz.uu
~/lisp> mail -s "Lisp: Homework #1" lij3@cs.rpi.edu < wumpus.tar.gz.uu

As you can see, I'd like you to tar, gzip, and then uuencode your files. If you have any questions about this process, email me by Friday morning.

You should also include a brief README listing the names of your group members, and anything special we should know about your code.

How do I use packages?

Under gcl and kcl, the macros for defining a package are not correctly implemented to support the ANSI standard. Since not everyone has access to Allegro, you should use the old functions to create your packages.

Note that the package we called "COMMON-LISP," the correct name, is called "LISP" before the ANSI standard.

Ok, so I set up the packages, but my code that worked for project #1 broke!

You may have been comparing symbols read from the file with constants in your code (at least I was). If this is your problem, try using (symbol-name) to remove the Wumpus:: prefix from the symbols, so that you can compare them.

Every time I reload my code after fixing a bug, it complains that the package already exists. How do I stop this?

Try using (find-package) to guard against recreating the package.

How big should random worlds be?

Six is a nice size. It can (and should) be fixed.

How do I generate a random number?

(random max) returns a random number 0 <= num < max

How do I change the random "seed"?

(setf *random-state* (make-random-state t))

How many pits should there be, or is it not fixed?

3

Random Hint?

I had my random generation function create a file to be read in by my loading function from Homework #1... Code reuse, anyone?


Back to Main Page...
Page created by Kenneth Flynn
flynnk@rpi.edu