Skip to content

fabioo29/ai-wumpus-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Propositional Logic/First Order Logic AI Agent in Wumpus world

Knowledge, Reasoning and Planning Challenges :: Wumpus Problem :: Fundamentals of AI


original wumpus world map

Table of Contents

  1. About
  2. Simulation
  3. License
  4. Contact

About

AI Wumpus agent (Traditional map) AI Wumpus agent (random map)
Product Name Screen Shot Product Name Screen Shot

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 world interface(pygame)

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.

Simulation

Prolog

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/ logs

Python

pip 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 map

License

Distributed under the MIT License. See LICENSE for more information.

Contact

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.

About

Intelligent agent that plays the wumpus world game. SWI-Prolog was used for the game/agent logic itself and Python for the game interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors