FirstOrder Logic Better choice for Wumpus World n
First-Order Logic: Better choice for Wumpus World n n Propositional logic represents facts First-order logic gives us n n n Objects Relations: how objects relate to each other Functions: return value for given input
Syntax and Semantics n First-order logic has the following: n Constant symbols represent objects n n Predicate symbols represent relations n n book, A, cs 327 Older. Sibling(Lisa, Bart) Older. Sibling(Maggie, Lisa) Older. Sibling(Maggie, Bart) Function symbols represent functions n Father. Of(Luke) = Darth. Vader
Syntax and Semantics n Atomic Sentences n n n Complex Sentences n n Father(Luke, Darth. Vader) Siblings(Son. Of(Darth. Vader), Daughter. Of(Darth. Vader)) and, or, not, implies, equivalence Equality
Universal Quantification n n “For all, for every”: Examples: Usually use with Common mistake to use
Existential Quantification n “There exists”: Typically use with Common mistake to use n True if there is no one at Carleton!
Properties of quantifiers n Can express each quantifier with the other
Some examples n Definition of sibling in terms of parent:
First-Order Logic in Wumpus World n Suppose an agent perceives a stench, breeze, no glitter at time t = 5: n n n Percept([Stench, Breeze, None], 5) [Stench, Breeze, None] is a list Then want to query for an appropriate action. Find an a (ask the KB):
Simplifying the percept and deciding actions n Simple Reflex Agent
Using logic to deduce properties n Define properties of locations: n Diagnostic rule: infer cause from effect n Causal rule: infer effect from cause n Neither is sufficient: causal rule doesn’t say if squares far from pits can be breezy. Leads to definition:
- Slides: 10