Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Wumpus World
3.
Wumpus World Problem
4.
PEAS Description of the Wumpus World
4.1.
Performance
4.2.
Environment 
4.3.
Actuators
4.4.
Sensors
5.
Properties of the Wumpus World
6.
Wumpus World Example
6.1.
Step 1
6.2.
Step 2
6.3.
Step 3
6.4.
Step 4
7.
Frequently Asked Questions
7.1.
What is the wumpus world problem solving process?
7.2.
What are the sensors in Wumpus World?
7.3.
How do you play Wumpus world?
7.4.
How does the agent perceive the Wumpus World?
8.
Conclusion
Last Updated: May 22, 2024
Easy

Wumpus World in AI

Introduction

The Wumpus World is inspired by the video game “Hunt the Wumpus” by Gregory Yob in 1973. The Wumpus World in AI is an example to depict the knowledge-based agent that represents knowledge representation, planning, and reasoning to achieve the goal.

Wumpus World in AI

In the Wumpus World, an agent is trying to find gold in the Wumpus cave. Let’s see how the agent uses his knowledge to achieve his goal.

Wumpus World

The Wumpus World is a classic problem in artificial intelligence used to illustrate knowledge representation, reasoning, and planning. It's a simplified environment where an agent (usually represented as a robot) needs to navigate and accomplish a goal.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Wumpus World Problem

Wumpus World is a 4/4 cave with 16 rooms that are connected to each other with passageways. We have a knowledge-based agent and a beast called Wumpus, who can not move anywhere but eats anyone who enters the room. The agent starts from Room [1,1] and goes forward in the Wumpus World. The agent has only a single arrow that can be used to kill the Wumpus.

In this world, there are some Pits rooms that are bottomless, and if the agent enters the Pits, he will be stuck there forever. The agent's main goal is to find the gold and leave the cave without entering Wumpus and Pit's room. The agent will be rewarded if he comes out with gold. Otherwise, he will be penalized if he falls into the Pit or is eaten by the Wumpus.

Following is the Wumpus World example where there are some rooms with Pits, one agent room at (1,1) square, and one room with Wumpus.

Wumpus World example

PEAS Description of the Wumpus World

We have a PEAS description that explains the Wumpus World, and PEAS represents the Performance, Environment, Actuators, and Sensors.

Performance

The following rules will measure the agent's performance.

  • +1000 points will reward the agent if the agent gets the gold and return back safely.
  • The agent will be penalized by -1000 points if the Wumpus eats the agent or falls into the Pit.
  • -1 point for each move
  • -10 points for using the arrow.

Environment 

The environment of the agent is described below:

  • A cave with 16 rooms (4*4 grid).
  • Initially, the agent is in room [1,1].
  • Wumpus adjacent rooms (except diagonally) are stinking.
  • Except for the agent starting position [1,1], Gold and Wumpus can be anywhere in the cave.

Actuators

Actions that the agent can perform are known as Actuators. The actions of the agents are as follows:

  • Right turn
  • Left turn
  • Move forward
  • Shoot
  • Grab
  • Release

Sensors

The sensors that the agent can sense are as follows:

  • Stench: Wumpus adjacent rooms have some stench, and the agent will perceive the stench.
  • Breeze: Pit adjacent rooms have the breeze.
  • Scream: Scream can be recognized anywhere when the Wumpus is killed.
  • Glitter: Glitter will be recognized in the gold room.

Properties of the Wumpus World

Now we will discuss the properties of the Wumpus World problem.

Partially Observable: The agent can only recognize its adjacent rooms that’s why the Wumpus World is partially observable.

Deterministic: The result is already known, so it is deterministic.

Sequential: The order followed by the agent is important, so it is sequential.

Static: Only the agent is moving. Wumpus and Pits stay at the same place.

Discrete: The environment in the Wumpus World is discrete. This means that the map has a finite number of actions, rooms, and outcomes.

Single agent: Only a single knowledge-based agent is in the Wumpus World.

Wumpus World Example

Let’s see the below example to explore the Wumpus World and will see how the agent will find his goal.

Example image

Below are the steps taken by the agent to find the gold.

Step 1

Initially, the agent is in the room [1,1] and does not feel any Breeze or any Stench which means the adjacent rooms are also OK. Room [1,1] is safe, so we will add a symbol OK.

Step 1

Step 2

Now agent has only two options, either he can move to [1,2] or [2,1]. Suppose the agent chooses to move to the room [2,1]. In this room, the agent recognizes the breeze, which means Pit is around this room. The Pit can be in [3,1] or [2,2], so he will add a recognition symbol P to say that this is a Pit room.

Step 2

Now agent will stop and go back to the room [1,1]. The room [1,1] and [2,1] are now visited by the agent, so we will use the symbol V to represent the visited rooms.

Step 3

Now the agent will move to [1,2] room which is OK. In this room, the agent perceives a stench that denotes a Wumpus around the room. But Wumpus cannot be in the room [1,1] as it is already visited and also not in [2,2] because when the agent was at [2,1], he had not detected any stench. 

Step 3

Therefore agent guesses that Wumpus is in the room [1,3], and in the current room, there is no breeze which means there is no Pit in the room [2,2]. So finally, the agent marks OK and moves further into the room [2,2].

Step 4

Now, the agent is in the room [2,2], and there is no breeze and stench present, so let’s suppose the agent decides to move into the room [2,3]. In this room [2,3] agent perceives glitter, so he will grab the gold and climb out of the cave.

Step 4

Note: The problem is successfully solved if Agent ‘A’ is safe at the end without being eaten up by the Wumpus ‘W’ or avoiding falling into the pit ‘P’.

Frequently Asked Questions

What is the wumpus world problem solving process?

The agent explores, builds a mental map, and reasons to find gold while avoiding pits and the Wumpus.

What are the sensors in Wumpus World?

The agent perceives breezes (near pits) and stench (near the Wumpus) in its current location.

How do you play Wumpus world?

There's no direct "play" as it's a problem for AI agents. Imagine an agent program navigating a virtual Wumpus World.

How does the agent perceive the Wumpus World?

The agent perceives the Wumpus World through a set of sensors.

Conclusion

In this article, we discussed the Wumpus World problem. We hope this blog helped you to enhance your knowledge of this Artificial Intelligence problem. Check the below articles to know more.

And many more on our platform Coding Ninjas Studio.

Refer to our Guided Path to upskill yourself in DSACompetitive ProgrammingJavaScriptSystem Design, and many more! If you want to test your coding ability, you may check out the mock test series and participate in the contests hosted on Coding Ninjas Studio!

But suppose you have just started your learning process and are looking for questions from tech giants like Amazon, Microsoft, Uber, etc. For that purpose, take a look at the problemsinterview experiences, and interview bundles for placement preparations.

However, you may consider our paid courses to give your career an edge over others!

Happy Learning!

Previous article
Local Search Algorithm in Artificial Intelligence
Next article
Difference between Bagging and Boosting
Live masterclass