This assignment is worth 10% of your final mark.
To run the game, login to cs26 and make a copy of wump.nw from the G363 directory. Then run the command noweb wump.nw. This will produce a file wump.pl (and a file wump.tex; ignore the latter for now). You can now load wump.pl into SICStus Prolog. To play the game, type the query
?- enter_maze(maze_1).or
?- enter_maze(random).Once you understand the game, read the section on ``Literate Programming'' below, and then do the following.
You will need to:
The status message should look like this:
You can win by moving along the path [2,20,40,15] Be careful to kill the bat in room [20]If there is no pit-free path to the Wumpus, the status message should report ``Victory is unlikely''.
I recommend you use the SICStus Prolog ugraphs library predicates del_vertices/3 and min_path/5, and the ordsets library predicate ord_intersection/3; i.e. include the following chunk in your program:
<>= :- use_module(library(ordsets), [ord_intersection/3] ). :- use_module(library(ugraphs), [del_vertices/3, min_path/5]). @
All changes you make to Hunt the Wumpus should be made to your copy of wump.nw, which you can obtain from the G363 directory. Although there are a large number of typesetter instructions, you should only need to be aware of the following:
% noweb wump.nwor, in Emacs, use M-x compile RET noweb wump.nw RET. There may be a NCSA-Telnet key set up to do this; check the NCSA-Telnet HELP screen.
Oh, and sorry---there is no way you can do this assignment using the Macintosh Prolog. Please let me know if you would like an additional tutorial on using Unix.
The program part (i.e. your final version of wump.pl) is to be submitted electronically, using the submit-ass-3 utility. You should find this utility in the G363 directory. To submit your program, type
A key will be set up to automate this task for Emacs users; check the HELP screen for details.