The wumpus (plural wumpi) is a large, foul smelling creature that lives in an underground labyrinth. The wumpus particularly enjoy dining on hunters and will immediately devour any hunter who enters its chamber. Only the bravest hunters enter the lair of the wumpus and many never return. The caves are also inhabited by superbats. These creatures simple wish to be left alone. They cling to the room of a chamber and occasionally flap their wings.
The labyrinth consists of a number of chambers, each connected to three other chambers by passages. Each chamber has a name so the hunter can keep a record of locations they have visited in the labyrinth. The chambers of the labyrinth are totally dark and it is impossible to see within them. The passages are dimly lit so that the hunter can easily move between chambers. Some chambers have pits and the unwary hunter who enters such a chamber will fall into the pit and die. The wumpus, on the other hand has suckers on its feet and clings to the walls, so it is unaffected by the pits. Since superbats cling to the roof of the chamber, they can also occupy chambers with pits.
When a superbat is disturbed by a hunter entering its chamber, it flies down, picks up the hunter, and takes the hunter to a randomly selected empty chamber. The bat then returns to its original chamber. The bat is unable to move the wumpus because the wumpus is so large and has learned to ignore it.
The hunter enters the cave armed with hand grenades that are used to
kill the wumpus. The hunter starts with twice as many grenades as there
are wumpi in the cave. At each turn, the program reports the name
of the chamber the hunter is in and the names of the rooms that can reached
through each passage. When the hunter enters an empty chamber,
they may sense the presence of danger in one or more of the adjacent chambers.
The program will report these sensations as follows:
| Condition in adjacent chamber | Report (# = number of grenades) |
| Wumpus present | I smell a wumpus. I have # grenades. |
| Superbat present | I hear bats. |
| Pit | I feel a draft. |
When the hunter enters a room with a bat, the program reports that the hunter is being transported by the bat and then reports on the room where the bat leaves the hunter.
The hunt starts with the hunter in the entry chamber, the chanber in
the configuration file with the hunter. This chamber contains neither
a wumpus nor a superbat nor a pit. At each turn, the hunter has three choices
| Command | Effect |
| m # | move to through the specified passage to an adjacent chamber |
| t # | throw a grenade down the specified passage to the adjacent chamber |
| r | resign (end the game) |
where # is the number of the passage, 1, 2, or 3. When a grenade is thrown into a chamber containing a wumpus, the wumpus dies. The game ends when all wumpi have been killed. When a grenade explodes in a chamber adjacent to a chamber in which a wumpus is sleeping, it is awakened and moves to a random adjacent chamber that is not occupied by another wumpus. Grenades have no effect on bats because the chamber roof is so high.
The initial cave configuration is stored in a configuration file with
the following format:
line 1:
number of chambers
line 2 on: chamber number
and
chamber status (empty, hunter, wumpus, bats, pits) and
numbers of three adjancent chambers and
chamber name
The configuration file is always named caves.dat