| CSC 8310 Prolog Assignment Spring 2001, David Matuszek |
Your assignment is to write an adventure game in SWI-Prolog. Pick any theme you like for your adventure game: rescue, survival, treasure hunt, "a day in the life," or whatever else appeals to you.
Here are some adventure games that you can use to give you some ideas for your
own adventure game. Dragon is (it's
a minor modification of the older Spider
game), so you should probably look at it first. Sleepy
uses more complex logic, including not ( /+ )
and or ( ; ), and is probably too complex for
your first program.
I recommend that you copy the file program.pl and use it as a starting point. This is an absolutely boring game consisting of one room, one object, and one direction you can go (but going in that direction takes you back to the same room). Add to this code to create your own game; if it doesn't do what you want, fix it so that it does. This is free code, to use or modify any way you like. If you don't want to use it, that's OK too.
You are expected to write a reasonable amount of Prolog code of your own, not just object descriptions and room descriptions. Put in some useful objects. Add at least two or three verbs that operate on these objects, for example: a gun that you can load and shoot, a switch that you can flip, a lock that you can unlock, a light that you can turn on or off, a box that you can open, food that you can eat, a note that you can read, etc., etc.
You should have a start/0 predicate (similar to the one provided)
that my grader and I can use to start your game and find out what verbs you
have added. Don't make us look at the code to figure out how to run your program!
Grading will not be 100% objective. If we like your game, we may give you extra points for it. If your game seems to lack creativity and interest, you may lose points.
Please turn in:
Due date: Section 1, February 5; Section 2, February 7.