An intelligent agent simulation of the classic Wumpus World problem, featuring a graphical interface and advanced reasoning modules. The agent explores a grid-based world, avoids deadly Wumpuses and pits, and tries to retrieve the gold and escape safely.
- Features
- Installation
- Usage
- Game Controls
- Project Structure
- How It Works
- Credits
- License
- Contributing
- Troubleshooting
- Useful Links
- Customizable grid size, number of Wumpuses, and pit probability
- Moving Wumpus option for advanced challenge
- Intelligent agent with knowledge base, inference engine, and planning module
- Pygame-based graphical interface
- Real-time display of agent's percepts, actions, and score
- Modular code for easy extension and experimentation
- Clone the repository:
git clone https://github.com/NhanPhamThanh-IT/Wumpus-World-Game.git
- Install Python 3.11+ and pip
- Install required packages:
pip install pygame
Run the game from the command line:
python main.pyYou will be prompted to enter:
- Grid size (default: 8)
- Number of Wumpuses (default: 2)
- Pit probability (default: 0.2)
- The agent is fully autonomous; you only need to set the initial parameters.
- To quit, close the game window.
main.py # Entry point, runs the game loop
config/environment.py # World generation and environment logic
logic/agent.py # Agent reasoning and decision-making
logic/knowledge_base.py# Agent's knowledge representation
logic/inference_engine.py # Logical inference for safe/risky cells
logic/planning_module.py # Pathfinding and planning
ui/visualization.py # Pygame-based GUI
README.md, LICENSE # Documentation and license
- Environment:
- Generates a grid with Wumpuses, pits, and gold.
- Updates percepts (stench, breeze, glitter) for each cell.
- Agent:
- Maintains a knowledge base of visited and inferred cells.
- Uses an inference engine to deduce safe/risky cells.
- Plans paths to gold, safe unvisited cells, or escape.
- Executes actions: move, turn, grab, climb out, shoot arrow.
- Visualization:
- Displays the grid, agent, hazards, and percepts.
- Shows agent's score, last action, and percepts in real time.
- Developed by Nhan Pham Thanh
- Inspired by the classic AI Wumpus World problem
This project is licensed under the MIT License. See LICENSE for details.
Contributions, bug reports, and suggestions are welcome! Feel free to open issues or submit pull requests.
- If you encounter issues with Pygame, ensure your Python and pip versions are up to date.
- For graphical errors, check your system's graphics drivers and Pygame installation.
- For any other problems, please open an issue on the GitHub repository.
- Customizable grid size, number of Wumpuses, and pit probability
- Moving Wumpus option for advanced challenge
- Intelligent agent with knowledge base, inference engine, and planning module
- Pygame-based graphical interface
- Real-time display of agent's percepts, actions, and score
- Modular code for easy extension and experimentation
- Clone the repository:
git clone https://github.com/NhanPhamThanh-IT/Wumpus-World-Game.git
- Install Python 3.11+ and pip
- Install required packages:
pip install pygame
Run the game from the command line:
python main.pyYou will be prompted to enter:
- Grid size (default: 8)
- Number of Wumpuses (default: 2)
- Pit probability (default: 0.2)
Contributions, bug reports, and suggestions are welcome! Feel free to open issues or submit pull requests.
- If you encounter issues with Pygame, ensure your Python and pip versions are up to date.
- For graphical errors, check your system's graphics drivers and Pygame installation.
- For any other problems, please open an issue on the GitHub repository.
-
The agent is fully autonomous; you only need to set the initial parameters.
-
To quit, close the game window.
main.py # Entry point, runs the game loop
config/environment.py # World generation and environment logic
logic/agent.py # Agent reasoning and decision-making
logic/knowledge_base.py# Agent's knowledge representation
logic/inference_engine.py # Logical inference for safe/risky cells
logic/planning_module.py # Pathfinding and planning
ui/visualization.py # Pygame-based GUI
README.md, LICENSE # Documentation and license
- Environment:
- Generates a grid with Wumpuses, pits, and gold.
- Updates percepts (stench, breeze, glitter) for each cell.
- Agent:
- Maintains a knowledge base of visited and inferred cells.
- Uses an inference engine to deduce safe/risky cells.
- Plans paths to gold, safe unvisited cells, or escape.
- Executes actions: move, turn, grab, climb out, shoot arrow.
- Visualization:
- Displays the grid, agent, hazards, and percepts.
- Shows agent's score, last action, and percepts in real time.
- Developed by Nhan Pham Thanh
- Inspired by the classic AI Wumpus World problem
This project is licensed under the MIT License. See LICENSE for details.
