The Wumpus World (Originally Hunt the Wumpus) is a game created by Gregory Yob (Origins) and which is presented simplified in Artificial Intelligence a Modern Approach (AIMA) as an exercise for developing an Intelligent Agent that uses logic. The code presented here is one of the many possible approaches to the problem using Prolog.
The code uses logic programming, situational calculus, planning and heuristics to create an intelligent agent that plays the game. The original code is exaggeratedly commented (for beginners), so a less commented version was provided for those that already understand Prolog better.
To run this code you must first install a Prolog Environment such as SWI-Prolog. Once installed, double click the main.pl file to open the environment on the folder. As the main.pl file consults the worldBuilder.pl file, they must always be in the same folder, and the environment should be opened on that same folder.
Once the enviroment is opened, type the following query on the Prolog environment:
run.
or
runManyMaps(1,1000).
"run." will always play the AIMA map, while runManyMaps(X,Y) will run all maps subsequently from X to Y. 2000 maps where provided in the worldBuilder.pl, which were randomly generated following AIMA rules.
- SWI-Prolog - The Prolog environment used.
- Alexander Csóka Roque - developed in April 2018
This project is licensed under the MIT License - see the LICENSE.md file for details