A more general reasoning case
The wumpus world despite its triviality, contains some deeper abstractions that are worth summarizing.- Logical inference can be done via an internal representation that are sentences - their syntax and semantics we will examined next.
- Sentences may be expressed in natural language. Together with the perception and probabilistic reasoning subsystems that can generate symbols associated with a task, the natural language can be grounded and inferences can be drawn in a ‘soft’ or probabilistic way at the symbolic level.
Model-Checking Algorithm
The reasoning algorithm regarding the possible state of the environment in surrounding cells that the agent performed informally above, is called model checking because it enumerates all possible models to check that a sentence is supported by the KB i.e. .

Propositional Logic Syntax
The PL syntax defines the allowable sentences that can be complex. Each atomic sentence consists of a single (propositional) symbol and the fixed symbols TRUE & FALSE. In BNF the atomic sentences or formulas are also called terminal elements. Complex sentences can be constructed from sentences using logical operators (connectives that connect two or more sentences). In evaluating complex sentences the operator precedence shown in the figure below must be followed.
- imply (⇒) operator: the left hand side is the premise and the right hand side is the implication or conclusion or consequent. This is an operator of key importance known as rule. Its an if-then statement.
- if and only if (⇔) operator: its expressing an equivalence (≡) or a biconditional.
Propositional Logic Semantics
The semantics for propositional logic specify how to compute the value of any sentence given a model. To do so we use the following truth table.
Inference Example
Using the operators and their semantics we can now construct an KB as an example for the wumpus world. We will use the following symbols to describe atomic and complex sentences in this world.| Symbols | Description |
|---|---|
| Pit in cel [x,y] | |
| Wumpus (dead or alive) in cel [x,y] | |
| Perception of a breeze while in cel [x,y] | |
| Perception of a stench while in cel [x,y] |
| Sentence | Description | KB |
|---|---|---|
| There is no pit in cel [1,1] | ||
| The cell [1,1] is breezy if and only if there is a pit in the neighboring cell. | ||
| The cell [2,1] is breezy if and only if there is a pit in the neighboring cell. | ||
| Agent while in cell [1,1] perceives [Stench, Breeze, Glitter, Bump, Scream]=[None, None, None, None, None] | ||
| Agent while in cell [2,1] perceives [Stench, Breeze, Glitter, Bump, Scream]=[None, Breeze, None, None, None] |


