Knowledge-base for Wumpus world in Artificial intelligence

In this page we will learn about Knowledge-base for Wumpus world in Artificial intelligence | Knowledge-base for Wumpus world in Artificial intelligence |Atomic proposition variable for Wumpus world | Some Propositional Rules for the wumpus world | Representation of Knowledgebase for Wumpus world | Prove that Wumpus is in the room (1, 3)


Knowledge-base for Wumpus world in Artificial intelligence

We studied about the wumpus world and how a knowledge-based agent evolves the world in the previous topic. Now, in this topic, we'll establish a knowledge base for the Wumpus world and use propositional logic to deduce some Wumpus-world facts.

The agent begins his visit in the first square [1, 1], and we already know that the agent is secure in this room. We'll utilize certain rules and atomic propositions to create a knowledge base for the wumpus world. For each place in the wumpus world, we need the symbol [I j], where I stands for row location and j for column location.

Knowledge Base for Wumpus World Intelligence (AI)

Atomic proposition variable for Wumpus world:

  • Let Pi,j be true if there is a Pit in the room [i, j].
  • Let Bi,j be true if agent perceives breeze in [i, j], (dead or alive).
  • Let Wi,j be true if there is wumpus in the square[i, j].
  • Let Si,j be true if agent perceives stench in the square [i, j].
  • Let Vi,j be true if that square[i, j] is visited.
  • Let Gi,j be true if there is gold (and glitter) in the square [i, j].
  • Let OKi,j be true if the room is safe.

[Note: There will be 7*4*4= 122 propositional variables for a 4 * 4 square board. ]

Some Propositional Rules for the wumpus world:

Knowledge Base for Wumpus World2 Intelligence (AI)

[Note: Lack of variable gives similar rules for each cell. ]

Representation of Knowledgebase for Wumpus world:

The Simple KB for wumpus world when an agent moves from room [1, 1], to room [2,1] is as follows:

Knowledge Base for Wumpus World3 Intelligence (AI)

We mentioned propositional variables for room[1,1] in the first row, indicating that the room has no wumpus (¬W11), no smell (¬S11), no Pit (¬P11), no breeze (¬P11), no gold (¬G11), has been visited (V11), and is safe (OK11).

We mentioned propositional variables for room [1,2] in the second row, indicating that there are no wumpus, stink, or breeze because an agent has not visited room [1,2], no Pit, and the room is safe.

We mentioned a propositional variable for room[2,1] in the third row, which shows that there are no wumpus(¬W21), no stink (¬S21), no Pit (¬P21), Perceives breeze(B21), no glitter(¬G21), visited (V21), and the room is secure (OK21).

Prove that Wumpus is in the room (1, 3)

We can prove that wumpus is in the room (1, 3) using propositional rules which we have derived for the wumpus world and using inference rule.

  • Apply Modus Ponens with ¬S11 and R1: At first we will apply MP rule with R1 which is ¬S11 → ¬W11^ ¬W12 ^ ¬W21, and ¬S11 which will give this output ¬ W11 ^ W12 ^ W12
    Knowledge Base for Wumpus World4 Intelligence (AI)
  • Apply And-Elimination Rule: After we apply And-elimination rule to ¬W11 ∧ ¬W12 ∧ ¬W21, we will see three statements:
    ¬W11, ¬W12, and ¬W21.
  • Apply Modus Ponens to ¬S21, and R2: We will now apply Modus Ponens to ¬S21 and R2 which is ¬S21 → ¬W21 ∧¬ W22 ∧ ¬W31, which will give the Output as ¬W21 ∧ ¬W22 ∧ ¬W31
    Knowledge Base for Wumpus World5 Intelligence (AI)
  • Apply And -Elimination rule: Again we will now apply And-elimination rule to ¬ W21 ∧ ¬ W22 ∧¬ W31, We will see three statements:
    ¬W21, ¬W22, and ¬W31.
  • Apply MP to S12 and R4: Apply Modus Ponens to S12 and R4 which is S12 → W13 ∨. W12 ∨. W22 ∨. W11, we will get the output as W13 ∨ W12 ∨ W22 ∨ W11.
    Knowledge Base for Wumpus World6 Intelligence (AI)
  • Apply Unit resolution on W13 ∨ W12 ∨ W22 ∨ W11 and ¬W11 : After applying Unit resolution formula on W13 ∨ W12 ∨ W22 ∨ W11 and ¬W11 we will see W13 ∨ W12 ∨ W22
    Knowledge Base for Wumpus World7 Intelligence (AI)
  • Apply Unit resolution on W13 ∨ W12 ∨ W22 ∨ W11 and ¬W11 : After applying Unit resolution formula on W13 ∨ W12 ∨ W22 ∨ W11 and ¬W11 we will see W13 ∨ W12 ∨ W22.
    Knowledge
  • Apply Unit resolution on W13 ∨ W12 ∨ W22 and ¬W22 : After applying Unit resolution on W13 ∨ W12 ∨ W22, and ¬W22, we will get W13 ∨ W12 as output.
    Knowledge Base for Wumpus World9 Intelligence (AI)
  • Apply Unit Resolution on W13 ∨ W12 and ¬W12 : After Applying Unit resolution on W13 ∨ W12 and ¬W12, we will see W13 as an output, therefore, it is proved that the Wumpus is in the room [1, 3].
    Knowledge Base for Wumpus World10 Intelligence (AI)
Best way of learing

Self learing is the best learing in the world. Discover yourself first then will get what you are And what you want to do .It will push you for self learing.

Why you need to learn coding?

Coding will play a vital role in one's life . It will help to open a new window of thinking . You can think better way than past . It helps to organise all the thing in better way .