Professional Documents
Culture Documents
AI Lec3-1
AI Lec3-1
Knowledge Representation
• When we use search to solve a problem we
must
– Capture the knowledge needed to formalize the
problem
– Apply a search technique to solve problem
– Execute the problem solution
Role of KR
• The first step is the role of “knowledge
representation” in AI.
• Formally,
– The intended role of knowledge representation in
artificial intelligence is to reduce problems of
intelligent action to search problems.
• A good description, developed within the
conventions of a good KR, is an open door to
problem solving
• A bad description, using a bad representation, is a
brick wall preventing problem solving
A Knowledge-Based Agent
• Now we look at extended capabilities to
general logical reasoning.
• Here is one knowledge representation: logical
expressions.
• A knowledge-based agent must be able to
– Represent states, actions, etc.
– Incorporate new percepts
– Update internal representations of the world
– Deduce hidden properties about the world
– Deduce appropriate actions
The Wumpus World Environment
Percepts
WW Agent Description
• Performance measure
– gold +1000, death -1000
– -1 per step, -10 for using arrow
• Environment
– Squares adjacent to wumpus are smelly
– Squares adjacent to pit are breezy
– Glitter iff gold is in same square
– Shooting kills wumpus if agent facing it
– Shooting uses up only arrow
– Grabbing picks up gold if in same
square
– Releasing drops gold in same square
• Actuators
– Left turn, right turn, forward, grab,
release, shoot
• Sensors
– Breeze, glitter, smell, bump, scream
Sample Run
Sample Run
Sample Run
Sample Run
Sample Run
Sample Run
Sample Run
Sample Run
Sample Run
Now we look at
Entails
Sentences Sentence
S S
e e
Representation m m
a a
n n
World t t
i i
c c
s s
Follows
Facts Fact
Entailment Examples
• KB • KB
– The Giants won – CookLectures ->
– The Reds won TodayIsTuesday v TodayIsThursday
• Entails – - TodayIsThursday
– Either the Giants won or the Reds – TodayIsSaturday -> SleepLate
won – Rainy -> GrassIsWet
• KB – CookLectures v TodayIsSaturday
– To get a perfect score your – GrassIsWet
program must be turned in today – - SleepLate
– I always get perfect scores • Which of these are correct
• Entails entailments?
– I turned in my program today – - Sleeplate
– GrassIsWet
– - SleepLate v GrassIsWet
– TodayIsTuesday
– True
Models
• Logicians frequently use models, which are
formally structured worlds with respect to
which truth can be evaluated. These are our
“possible worlds”.
• M is a model of a sentence s if s is true in M.
• M(s) is the set of all models of s.
• KB entails s (KB |= s) if and only if M(KB) is a
subset of M(s)
Entailment in the Wumpus World