Concept VisualiSation for solving Wumpus World Problem
Published: 2023-07-16 08:16:11

---
title: Concept VisualiSation for solving Wumpus World Problem
published: true
date: 2020-08-24 20:32:09 UTC
tags: 
canonical_url: https://theuigirl.hashnode.dev/concept-visualization-for-solving-wumpus-world-problem-1e6c96824265
---

#### VISUALIZATION-1

Have you ever seen an automated vacuum cleaner cleaning the house? It cleans the whole room without any human interaction. But how does it get to differentiate between the position furniture and free space? Humans can do it easily by their vision and reasoning but for robots, it is pretty hard to get background knowledge about the environment. In AI, this approach is embodied in Knowledge-Based Agents.

> Lets play a game which will help you to clearly understand this concept. Here you will explore a new environment in order to win the heap of gold.

The game consists of an environment of 4X4 grids. It is called the Wumpus World. There will be a heap of gold which needs to be grabbed to win the game along with a wumpus lurking somewhere in the grids(fortunately the wumpus does not move). There will also be some bottomless pits here which can trap anyone except the wumpus. Now, go through the Game Rules and try to win the heap of gold.

#### Percepts:

- When you will be near a wall, you will get a bump percept.

- When there will be a wumpus nearby, you will get a stinct percept

- When there will be pits nearby, you will get a breeze percept

- When you will be near a wall, you will get bump a percept.

- If you get stuck in a grid with the wumpus, you will get a scream percept

> **Note:** Hereby nearby, we mean the adjacent cells(Excluding Diagonal) of your position

<iframe src="https://codepen.io/anisha1234/embed/preview/bGpgyxe?height=600&amp;slug-hash=bGpgyxe&amp;default-tabs=css,result&amp;host=https://codepen.io" width="700" height="525"></iframe>

Well, were you able to grab the gold coins? Yes? Pretty simple isnt it? But will you be able to grab the gold if the wumpus, pits and heap of gold are hidden? Come on, give it try.

<iframe src="https://codepen.io/anisha1234/embed/preview/VwaPJPY?height=600&amp;slug-hash=VwaPJPY&amp;default-tabs=css,result&amp;host=https://codepen.io" width="700" height="525"></iframe>

So were you able to win the game this time? Yes? But how did you do that? In the game, you acted as a knowledge-based agent, who initially did not have much background knowledge about the environment, as all the pits, wumpus and gold were hidden and you only knew about their presence, not location. You took the percept as input, combined and recombined information and yielded the Agents movement as output.

#### A Logical agent who will do the same thing:(TO DO)

Now imagine an automated robot playing the same game that you played earlier. Here the robot will act as the agent and it will start from [1,1] and try to go to cells which it knows does not have any pit or wumpus. Initially, its knowledge will contain the rules of the environment only and discovering the location of pits and wumpus will complete its background knowledge. In a typical situation where there is no clue about the environment, this type of knowledge-based agents works effectively to searching purpose.

So thats it for this article. I hope you have checked out the visualization and if you liked it then do not forget to tell us your thoughts in the comment section below.

> _If you want to connect with me, here I am at_ [_Twitter_](https://twitter.com/anishaswain) _or_ [_Instagram_](https://www.instagram.com/anisha_swain_/)

**Announcement:** we will be ding d3.js tutorials soon so stay tuned.

Follow our community [LinkedIn group](https://www.linkedin.com/groups/13894715/), [Facebook](https://www.facebook.com/iamtheuigirl) Page and [Twitter](https://twitter.com/the_ui_girl) for more such articles and posts and meet like-minded people to collaborate.