Models - classes.cs.uchicago.edu

Of Propositions & Predicates
Lecture 7-2
November 11th, 1999
CS250/350
Lecture 7-2
CS250: Intro to AI/Lisp
Logics aren’t Afraid of Commitment
• Ontological commitment
– How do you capture the reality of the
world?
– Propositional: “Just the facts, ma’am”
• Epistemological commitment
– Possible states of knowledge
– Law of the Excluded Middle
– Degree of belief
Lecture 7-2
CS250: Intro to AI/Lisp
Summary of Commitment
Lecture 7-2
CS250: Intro to AI/Lisp
Models
• Models are formal worlds in which truth is
evaluated
m is a model of  if
 is true in m
M() is the set of
all models in
which  is true
Lecture 7-2
CS250: Intro to AI/Lisp
Inferencing
Lecture 7-2
CS250: Intro to AI/Lisp
A Representational Straw Man:
Propositional Logic
• Combine symbols that represent
propositions with Boolean operators
• No commitments
Lecture 7-2
CS250: Intro to AI/Lisp
Semantics
Lecture 7-2
CS250: Intro to AI/Lisp
Practicing Inferencing
Suppose that:
=AB
KB = (A  C)  (B  C)
Does KB entail ?
Lecture 7-2
CS250: Intro to AI/Lisp
Does KB entail ?
Lecture 7-2
CS250: Intro to AI/Lisp
The Wumpus World
Lecture 7-2
CS250: Intro to AI/Lisp
Exploring the world
Perception: Stench, Breeze, Glitter, Bump, Scream
Perceive: [None, None, None, None, None]
Lecture 7-2
CS250: Intro to AI/Lisp
Move Forward to 2,1
Lecture 7-2
CS250: Intro to AI/Lisp
Perception after One Move
Lecture 7-2
Stench:
None
Breeze:
Yes
Glitter:
None
Bump:
None
Scream:
None
CS250: Intro to AI/Lisp
What Does the World Look Like?
Lecture 7-2
CS250: Intro to AI/Lisp
Complexity of Propositional Logic
• How can we draw inferences in
propositional logic?
• How many propositions do we have to
write?
• How long will it take to do inference?
Lecture 7-2
CS250: Intro to AI/Lisp
First-Order Predicate Logic,
Affectionately known as FOPL
Lecture 7-2
CS250: Intro to AI/Lisp
First-Order Logic
• World consists of objects and
predicates on objects
• Get to keep Boolean operators
• Add quantifiers
• Example
“The wumpus is dead” could be
Dead(wumpus)
“All wumpi are dead” could be
x Wumpi(x)Dead(x)
Lecture 7-2
CS250: Intro to AI/Lisp
Return to the Land of the Wumpus
• Use Tell to add assertions to the
knowledge base
• Use Ask to pose queries
– Answers to Asked queries are binding lists
(aka substitutions)
Tell(KB,Percept([Smell, Breeze, None],5))
Ask(KB,a Action(a, 5))
Does the KB entail any particular action at t=5?
{a/Shoot}
(That’s a yes)
Lecture 7-2
CS250: Intro to AI/Lisp
A Little Syntax
• Given a sentence S, and a substitution, 
S  denotes the result of plugging  into S
S = Smarter(x, y)
 = {x/Hillary, y/Bill}
S  = Smarter(Hillary, Bill)
What does Ask(KB, S) do in these terms?
Returns some (or all)  such
that:
KB |= S
Lecture 7-2
CS250: Intro to AI/Lisp
KB for WW
• Represent perceptions more abstractly
– Write rules to transform percepts into
predicates
• Map from predicates to actions
Why is this a better approach?
Lecture 7-2
CS250: Intro to AI/Lisp