Knowledge, Reasoning and Planning Challenges :: Wumpus Problem :: Fundamentals of AI
| AI Wumpus agent (Traditional map) | AI Wumpus agent (random map) |
|---|---|
Motivation: Academic project for Fundamentals of Artificial Intelligence, M2AI. Use SWI-Prolog to create an AI agent for the Wumpus World game using Prepositional Logic/First-Order Logic.
Implementation: SWI-Prolog was used in order to build all the game logic and all the agent logic aswell. Later on was built a Pygame 2D game interface in order to evaluate the agent behavior. Pyswip (python package) was used to execute prolog queries through Python. There's also a mode where user can play the game. The agent possible actions are move-forward, turn-left, turn-right, grab-gold, climb-out, shoot(not at the moment/feature update). The agent sucess rate is about 70% on random maps.
Wumpus game interface without the fog (pygame)
Tested with with random placed wumpus, pits and gold in the map (70% win).
Built With Pygame (game interface) and SWI-Prolog for the AI agent/Wumpus game logic.
consult('sr/prolog/main.pl'). % load prolog file
run(user). % cli for user to test the game
run(map). % agent simulation on traditional map
run. % agent simulation on a random map w/ logspip install -r requirements.txt # pygame and pyswip
python main.py # agent simulation on a random map w/ interface
python main.py -user # playing mode for user to test the game
python main.py -map # run simulation on traditional mapDistributed under the MIT License. See LICENSE for more information.
Fábio Oliveira - LinkedIn - fabiodiogo29@gmail.com
Project Link: https://github.com/fabioo29/ai-wumpus-world
Project built as a Msc. Applied Artificial Intelligence Student.