Version 2.7 (released 10/27/2015) Download
Copyright (c) 2015. Washington State University.
Written by Larry Holder (firstname.lastname@example.org).
The Wumpus Simulator is a simple C++ framework for simulating the Wumpus World described in Russell and Norvig's "Artificial Intelligence: A Modern Approach". The idea is for you to modify the Agent.h and Agent.cc files to implement your super-smart agent.
To try out the simulator, install the code on a UNIX system (or a system that has the 'make' program installed and a C++ compiler). Type 'make' to build the 'wumpsim' executable. Then, type './wumpsim'. You should see a randomly-generated 4x4 world, information about the game state, and a prompt for the next action (the default agent just accepts keyboard commands). When the game is over, scoring information is provided.
The wumpus simulator takes a few options, as described below.
wumpus N N
gold N N
pit N N
pit N N
where N is a positive integer. Some error checking is performed. A sample world file is provided in testworld.txt.
The simulator works by generating a new world and a new agent for each trial. Before each try on this world, the agent's Initialize() method is called, which you can use to perform any pre-game preparation. Then, the game starts. The agent's Process() method is called with the current Percept, and the agent should return an action, which is performed in the simulator. This continues until the game is over (agent dies or leaves cave) or the maximum number of moves (1000) is exceeded. When the game is over, the Agent's GameOver() method is called. If additional tries are left for this world, then the world is re-initialized, and the agent's Initialize() method is called again, and play proceeds on another instance of the same game.
After the number of tries is completed, the agent is deleted. So, you may want to store some information in the agent's destructor method to be reloaded during the agent's constructor method when reborn for the next trial. If additional trials have been requested, then a new wumpus world is generated, and the process continues as described above.
Scoring information is output at the end of each try, each trial and at the end of the simulation.
Your agent must include at least five methods: constructor, destructor, Initialize, Process, and GameOver. You may change any or all of these methods to implement your agent. And you may include additional methods as you see fit. You may also take advantage of the other classes defined for the simulator (e.g., Percept, Action, Orientation, Location, WorldState, WumpusWorld) by including them directly, subclassing them, or borrowing code for your agent. Once your agent is complete, simply type 'make' to remake the simulator with your agent. Then run 'wumpsim' to try it out.
Version 1.0 (released 10/01/1995) wumpus1.pl
Version 2.3 (released 10/01/2011) Download
These Prolog versions of the wumpus world simulator were written some time ago, but should still work in modern Prologs. Version 1 stays close to the original game. Version 2 adds images of rooms and natural language hints to test vision and NLP capabilities for your agent.
A more recent Prolog version is maintained by Dr. Ruben Carlo Benante here.
App versions of the wumpus world game are available for iOS and Android.