What is Wumpus World?
Wumpus World is a classic AI environment designed to test
logical reasoning agents. It features partial observability, uncertainty, and requires
intelligent reasoning to navigate safely.
Why Wumpus World is Perfect for KBAs:
- Partial Observability: Agent can't see the whole world
- Uncertainty: Multiple possible world states
- Logical Inference: Can derive safe actions from percepts
- Knowledge Accumulation: Each step adds new information
World Description
Wumpus World is a 4×4 grid where the agent must navigate to find gold while avoiding
dangers. The world contains:
Wumpus World Grid (4×4)
W
P
G
A
World Elements:
Dangers:
- Wumpus: Deadly monster (1 per world)
- Pits: Bottomless holes (0-3 per world)
Goals:
- Gold: Treasure to collect (1 per world)
- Exit: Return to starting position
Knowledge Representation
The agent represents its knowledge using propositional logic statements:
Knowledge Base Structure:
- Percepts: S₁,₁ (stench), B₁,₁ (breeze), G₁,₁ (glitter)
- Dangers: W₁,₁ (wumpus), P₁,₁ (pit)
- Safety: Safe₁,₁ (safe to enter)
- Visited: V₁,₁ (has been visited)
Inference Rules:
- S₁,₁ ↔ (W₁,₁ ∨ W₁,₂ ∨ W₂,₁) (stench means wumpus nearby)
- B₁,₁ ↔ (P₁,₁ ∨ P₁,₂ ∨ P₂,₁) (breeze means pit nearby)
- ¬W₁,₁ ∧ ¬P₁,₁ → Safe₁,₁ (safe if no wumpus and no pit)
Step-by-Step Reasoning Process
Let's trace through a typical reasoning sequence:
Reasoning Steps:
- Agent starts at (1,1) - safe by definition
- Moves to (1,2), perceives stench
- Concludes: W₁,₁ ∨ W₁,₃ ∨ W₂,₂
- Moves to (2,1), no stench
- Concludes: ¬W₁,₁ ∧ ¬W₂,₂
- Updates: W₁,₃ (wumpus must be at (1,3))
- Moves to (2,2), perceives breeze
- Concludes: P₂,₁ ∨ P₂,₃ ∨ P₁,₂ ∨ P₃,₂
- Continues reasoning to find safe path
Example Inference:
Given: S₁,₂ (stench at (1,2))
Rule: S₁,₂ ↔ (W₁,₁ ∨ W₁,₃ ∨ W₂,₂)
Conclusion: W₁,₁ ∨ W₁,₃ ∨ W₂,₂
Additional Info: ¬W₁,₁ (no stench at (2,1))
Final Conclusion: W₁,₃ ∨ W₂,₂
Agent Strategies
Different types of agents can approach Wumpus World differently:
Logical Agent:
- Uses knowledge base
- Applies inference rules
- Derives safe actions
- Most intelligent approach
Random Agent:
- Chooses actions randomly
- No reasoning
- Very likely to die
- Baseline for comparison
Performance Comparison:
- Logical Agent: High success rate, efficient
- Random Agent: Very low success rate
- Reactive Agent: Medium success rate, no learning
- Learning Agent: Improves over time
Wumpus World Extensions
Wumpus World can be extended to test more sophisticated reasoning:
Extensions:
- Larger Worlds: 5×5, 10×10 grids
- Multiple Wumpuses: More complex reasoning
- Probabilistic: Uncertainty in percepts
- Learning: Adapt to world patterns
Advanced Features:
- Time Constraints: Limited time to find gold
- Energy: Limited movement energy
- Communication: Multiple agents
- Dynamic World: World changes over time
Key Takeaways
Wumpus World:
- Classic testbed for logical agents
- Tests partial observability
- Requires logical reasoning
- Demonstrates knowledge-based AI
Lessons Learned:
- Knowledge representation is crucial
- Logical inference enables safe actions
- Partial observability is challenging
- Reasoning beats random behavior
Next Steps:
Now that we've seen how logical reasoning works in practice, we'll explore the
practical considerations and limitations in Topic 8: Practical Considerations.