🚀 https://wumpus-world-sooty.vercel.app/
The Wumpus World Knowledge-Based Agent is an Artificial Intelligence simulation that demonstrates how an intelligent agent can reason about its environment using logical inference and percept-based decision making.
The project is inspired by the classic AI problem known as the Wumpus World, where an agent must navigate a grid containing hidden dangers (pits and a Wumpus) while trying to make safe decisions using limited percepts.
This implementation is built using PyScript (Python in the browser) combined with HTML5 Canvas, CSS, and JavaScript, allowing full execution directly in the web browser without any backend.
The agent maintains a simple knowledge model of the environment and updates its beliefs based on percepts.
The agent receives environmental signals such as:
- Breeze → indicates nearby pit
- Stench → indicates nearby Wumpus
The agent uses basic rule-based reasoning to decide safe movement cells.
A grid-based world is created where each cell can contain:
- Agent position
- Empty space
- (Optional extension) hazards like pits or Wumpus
The system follows a continuous loop:
Perceive → Reason → Act → Update State
- Grid-based Wumpus World environment
- Real-time agent movement visualization
- Start and step-by-step execution control
- Basic decision-making based on environment state
- Movement tracking and state updates
- Simple rule-based reasoning system
- HTML5 Canvas-based grid rendering
- Color-coded agent movement display:
- 🔵 Blue → Agent
- ⚪ Gray → Unvisited cells
- 🟢 Green → Safe/visited path (optional extension)
- Runs directly in browser
- No backend or installation required
- Powered by PyScript
| Technology | Purpose |
|---|---|
| Python (PyScript) | Core AI logic |
| HTML5 | UI structure |
| CSS3 | Styling and layout |
| JavaScript | DOM interaction + canvas rendering |
| Git/GitHub | Version control |
| Vercel | Deployment platform |
index.html → User interface (buttons, canvas, layout)
style.css → Styling and UI design
logic.py → AI agent logic and environment simulation
- Grid environment is created
- Agent starts at position (0,0)
- Agent detects environmental signals (if implemented)
- Updates internal knowledge state
- Evaluates possible moves
- Chooses next safe action
- Agent moves on grid
- State updates in real-time
- Canvas updates after every step
- Agent position is rendered dynamically
Simply open:
index.html
- Clone repository:
git clone https://github.com/Maheen-Fatima-1/wumpus-world-project.git- Open project folder
- Run
index.htmlin a browser
This project is deployed using Vercel, which hosts static web applications.
This project was built using iterative development with Git version control, ensuring each feature is developed and committed separately.
- Initial HTML structure (UI setup)
- CSS styling and layout improvements
- Basic environment logic implementation
- Agent movement and state tracking
- Final rendering and system integration
This demonstrates proper software engineering workflow rather than single-step development.
- Full Knowledge Base implementation using propositional logic
- Advanced inference engine (resolution theorem proving)
- Pathfinding algorithms (BFS / DFS / A*)
- Win/Loss conditions (Gold collection, death states)
- Smarter AI decision-making
- Sound effects and animations
- Improved UI with modern game design
Maheen Fatima Computer Science Student Pakistan 🇵🇰
This project demonstrates how a simple AI agent can simulate reasoning in an uncertain environment using structured logic, perception handling, and decision-making — all executed in a browser environment using PyScript.