Propositional logic- Wumpus world
Consider a Wumpus world, where the agent has visited the following squares and has the following perceptions:
[1, 1]: Smell, but no Breeze
[1, 2]: no Smell or Breeze
[1, 3]: Breeze, but no Smell
The agent is currently at square [2,2] and perceives both a Smell and a Breeze.
a) How can the agent infer that the Wumpus is at square [2, 1]? Describe the reasoning in a mixture of words and formulas. You may need to take into account some general facts about the Wumpus world, as described in Russell & Norvig.
b) If the inference in part a) were to be implemented in propositional logic and proved using truth tables, how many rows would that truth table have? Hint: Think carefully about which facts and general rules of the world are needed! Give a thorough motivation/explanation for your answer. Note that you do not have to construct the actual truth table, but only state how many and which propositions need to be included.
c) Can the agent infer that square [3, 2] is safe, i.e. contains neither a Wumpus nor a pit? Either carry out the inference, using only propositional logic, or give a thorough explanation of why the agent cannot make the inference.
Solution
The Wumpus world is a simple world example to illustrate the worth of a knowledge-based agent and to represent knowledge representation. It was inspired by a video game Hunt the Wumpus.
The Wumpus world is a cave which has 4/4 rooms connected with passageways. So there are a total of 16 rooms which are connected with each other. We have a knowledge-based agent who will go forward in this world. The cave has a room with a beast which is called Wumpus, who eats anyone who enters the room. The Wumpus can be shot by the agent, but the agent has a single arrow. In the Wumpus world, there are some Pits rooms which are bottomless, and if an agent falls in Pits, then he will be stuck there forever. The exciting thing with this cave is that in one room there is a possibility of finding a heap of gold. So the agent's goal is to find the gold and climb out the cave without falling into Pits or eaten by Wumpus. The agent will get a reward if he comes out with gold, and he will get a penalty if eaten by Wumpus or falls in the pit.
Some atomic Proposition
S11 = There is a stench in cell (1,1)
B13 = There is a breeze in cell (1,3)
W21 = Wumpus is in cell (2,1)
V22= We have visited cell (2,2)
OK12 =Cell (1,2) is safe etc.
Some Rules
(R1) S11 => W1,2 W2,1
b)
Rule S11 => W12 W21. If S11 having stench means, there is a possibility that either wumpus in W12 or W21. As we know that wumpus is in W21 so there will be only one row needed in the truth table. As per truth table if statement P is false and statement Q is True then P Q will return True.
c)
Square [3, 2] is not safe. The reason behind the same is if we look at the cave square [3,1] is having breeze means there is a PIT in adjacent squares. So we can say that [3,2] and [4,1] is PIT.