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.
Copy the file adventure.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 can get additional ideas from spider.pl.
If you have trouble downloading these files, you can instead download the (identical) files adventure.txt and spider.txt, and change the .txt extension to .pl.
Special note: I would like to publish your game on my website, so that your classmates (and anyone else) can play your game. If you would prefer that I not do this, please say so clearly in your readme.txt file.
Your program should contain one (or more, if you like) of each of the following:
You should have a start/0 predicate (similar to the one provided)
that my TA and I can use to start your game and find out what commands you
have added. Don't make us look at the code to figure out how to run your program!
Also include an inventory command (abbreviation: i) to tell what the player is currently holding.
Play the game by running Prolog and typing queries into it. Prolog can easily read Prolog terms, but reading anything else is awkward, and not worth learning how to do. (However, if you want to ask the user for a number, you can use the read(X) predicate; a number is a term. Just remember to type a period after the number.)
Your program should work, should satisfy the above requirements, and should be reasonably formatted.
We reserve the right for some subjective judgment. If we like your game, we may give you bonus points for it. If your game seems to lack creativity and interest, you may lose points.
Wednesday, September 17, before 6:00am. Please zip up and turn in to Canvas a zip file containing:
.pl source code.readme.txt file containing:
The name of the game and the one-sentence description are for posting purposes. The transcript and the descriptions of the locked door, etc., are to make it possible for my TAs to grade your program without extensive effort.
Late penalties: 10 points per day, up to a maximum of 50 points. When grading of this assignment is completed and grades are posted (which will take an unpredictable amount of time), no further submissions will be accepted.
If you don't have access to Canvas, get the matter resolved beforehand. If Canvas is down for a brief period, that does not constitute a valid excuse for a late program. I do not, under any circumstances, accept assignments submitted by email.