CS 4 - Knowledge Representation-1
CS 4 - Knowledge Representation-1
Pilani Campus
Artificial Intelligence-[SESIZC444]
CS 4 -Knowledge representation &inference
Solving problems by
Representing the knowledge in state-space
Reasoning about the solution in logical steps
Sentence
representation of knowledge in a language called Knowledge representation
language
Represents an axiom, when the sentence is taken as given without being derived
from other sentences
TELL operation: Add new sentences to the knowledge base
ASK operation: Query what is known
Wumpus World
Actuators –
Forward,
TurnLeft by 90,
TurnRight by 90,
Grab – pick gold if present,
Shoot – fire an arrow, it either hits a
wall or kills wumpus. Agent has only
one arrow.
Climb – Used to climb out of cave, only
from [1, 1]
Symbolic Notation
A = Agent
B = Breeze
G = Glitter, Gold
OK = Safe Square
P = Pit
S = Stench
V = Visited
W = Wumpus
Action: Forward
Hence, KB
Operator Precedence: , , , ,
In ambiguous sentences like , resolution is
done using precedence, such that rather than
R1 : P1,1
R2 : B1,1 (P1,2 P2,1)
R3 : B2,1 (P1,1 P2,2 P3,1 )
R4 : B1,1
R5 : B2,1
Inference Rules
Modus Ponens (Latin for Mode that affirms) :
Whenever any sentence of the form () and are
given, then can be inferred
E.g., ((WumpusAhead WumpusAlive) Shoot
If (WumpusAhead WumpusAlive) is given, then
Shoot can be inferred
Inference Rules
And-Elimination: Given a conjecture, any of
the conjuncts can be inferred: or
E.g., If (WumpusAhead WumpusAlive) is
given, then WumpusAhead can be inferred
Inference Rules
All Logical Equivalence
rules can be used as
inference rules