Presentation is loading. Please wait.

Presentation is loading. Please wait.

First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7.

Similar presentations


Presentation on theme: "First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7."— Presentation transcript:

1 First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7

2 CS 471/598 by H. Liu2 Why and what zFOL makes a stronger set of ontological commitments (more than facts) zThe world consists of objects and relations. yObjects - things with individual identities yProperties - sth distinguishing them from others yRelations - sth between objects yFunctions - special relations with one value zFacts refer to objects, properties or relations yThe D-Backs beat the Cardinals.

3 CS 471/598 by H. Liu3 FOL zFOL is universal - it can express anything that can be programmed - what else do we want? zFOL is the most studied and best understood scheme yet devised. zIts syntax and semantics

4 CS 471/598 by H. Liu4 Syntax zSymbols (Fig 7.1, Page 187) yConstant symbols yPredicate symbols - relations, tuples yFunctional symbols - relations zTerms - objects, ground & complex terms zAtomic sentences yBrother(Richard, John), Married(Father(R),Mother(J)) zComplex sentences formed by connectives y!Brother(Robin,John)

5 CS 471/598 by H. Liu5 Quantifiers zUniversal quantification (  ) - to avoid enumerating the objects by name ycombining with variables, we can do that:  x Cat(x)  Mammal(x) y  x P(x)  Q(x) makes a statement about everything, but not when P(x) is false y  x P(x) ^ Q(x) leads to a too strong statement

6 CS 471/598 by H. Liu6 zExistential quantification (  ) - make a statement about some object without naming it. y  x P(x) ^ Q(x) - at least one P(x) and Q(x) is true y  x P(x)  Q(x) leads to a too weak statement yNo uniqueness is claimed

7 CS 471/598 by H. Liu7 Nested quantifiers zMultiple quantifiers can be used. zThe order of quantification is important. y  x  y Loves (y,x) y  y  x Loves (y,x) zWhen there is confusion, the variable belongs to the innermost quantifier that mentions it. y  x [Cat(x) v (  x Brother(Richard,x))] zWell-formed formula (wff) - sentences that have all their variables properly introduced.

8 CS 471/598 by H. Liu8 Connections, Equality zThe two quantifiers are connected via negation. zDe Morgan’s rules zDo we really need both quantifiers? zEquality symbol: two terms refer the same object or not the same object zIdentity relation

9 CS 471/598 by H. Liu9 Using FOL zAxioms - basic facts zDefinitions - concepts defined by axioms zTheorems - that are proved using axioms and definitions zIndependent Axioms zTwo important questions yAre axioms sufficient? yAre all axioms necessary?

10 CS 471/598 by H. Liu10 The domain of sets zEpmtySet - constant zMember, Subset - predicates zIntersection, Union, Adjoin - functions zEight axioms of sets: ythe only sets are EmptySet and those made by adjoining something to a set. zThe difference between lists and sets zAsking questions and getting answers yAsk(KB,  x Child(x,Spot)) - substitution

11 CS 471/598 by H. Liu11 Logical agents for Wumpus zReflex agents classify percepts and act zModel-based agents have an internal representation zGoal-based agents form goals and achieve them

12 CS 471/598 by H. Liu12 Constructing a logical agent zDefine the interface (percepts) between the environment and the agent yIncluding time using a time stamp xPercept ([Stench, Breeze,Glitter, None,None], 5) zDefine actions yActions: Turn, Forward, Shoot, Grab, Release, Climb zProvide an action:  a Action(a, 5) - a/Grab zModify the environment yTell(KB,Make-Action-Sentence(Grab,5)

13 CS 471/598 by H. Liu13 A simple reflex agent zDirect connections from percepts to actions yif see the gold, then grab it - (a) zOrganizing rules well makes a big difference yTable look-up to a true rule-base yOne stage vs multi-stage - flexibility xif atGold, then grab it - (b) zSimple reflex agents are simple-minded zReflex agents are unable to avoid infinite loops ydo exactly what it did before - how to go home?

14 CS 471/598 by H. Liu14 Representing change zStoring a complete percept sequence is tedious and inefficient to search for actions zAn internal model allows an agent to know its current status yhaving gold and at home square zRepresenting change is one of the most important tasks in KR yHow to represent change?

15 CS 471/598 by H. Liu15 Ways of representing change zThe latest case only, forget about the past = having a shallow memory and no history = repeating errors zEach state represented by a KB ycan’t reason about >1 situation simultaneously yneed to represent different situations/actions in one KB z Situation calculus yrepresenting situations and actions as representing objects

16 CS 471/598 by H. Liu16 Situation calculus zA particular way of describing change in FOL zEach situation is a snapshot of the state ySituations are generated from previous situations by actions (Fig 7.3) zGive an extra situation argument for every relation/property that can change over time yit’s always the last one argument xAt(Agent,[1,1],S 0 )^ At(Agent,[1,2],S 1 ) yusing Result(action, situation) xResult(Forward, S 2 ) = S 3

17 CS 471/598 by H. Liu17 Special axioms zEffect axioms - actions are described by stating their effects yHolding-gold via Grab, !Holing-gold via Release yAre the above enough? zFrame axioms - describing how the world stays the same yHolding-sth not releasing it, then holding it next state y!Holding-sth not (grab or present or portable) The two axioms together describe the world in change.

18 CS 471/598 by H. Liu18 zSuccessor-state axioms - resulting from the combining of the E- and F- axioms ytrue afterwards [an action made it true v true already and no action made it false] yOne SS axiom is needed for each predicate changing with time yA SS axiom must list all the ways in which the predicate can become true or false

19 CS 471/598 by H. Liu19 Keep track of location zWhat direction an agent is facing yOrientation(Agent,S 0 ) = 0 zHow locations are arranged (via a map) y  x,y LocationToward([x,y],90)=[x,y+1] yLocation l ahead of agent p:  p,l,s At(p,l,s)=> y  x,y Adjacent(x,y)  d x=LocationToward(y,d) zWhat’s known about the map y  x,y Wall([x,y]) (x=0 or x=5 or y=0 or y=5)

20 CS 471/598 by H. Liu20 zWhat actions change locations yGoing forward changes location zWhat actions change orientations yTurning changes orientation There are still many research issues: frame problems - even the property remains unchanged qualification problem - an action guaranteed to work ramification problem - implicit consequences of an action

21 CS 471/598 by H. Liu21 Deducing hidden properties zSynchronic rules yCausal rules specify the assumed direction of causality - model-based reasoning xSquares adjacent to pits are breezy yDiagnostic rules infer hidden properties from the percept-derived information xIf a location is smelly, the wumpus must either be in that location or in an adjacent location

22 CS 471/598 by H. Liu22 Which action zDifferent actions can achieve the same goal depending on constraints zSeparating facts about actions from facts about goals as goals describe the desirability of outcome states ydesirability scale: great, good, medium,risky, deadly zDefining the desirability of actions, leaving the inference to choose an action that has the highest desirability

23 CS 471/598 by H. Liu23 A goal-based agent zCertain actions lead to radical policy change: getting the gold -> returning y  s Holding(Gold,s) => GoalLocation([1,1],s) zExplicit goals allow many ways to work out a sequence of actions yInference ySearch yPlanning

24 CS 471/598 by H. Liu24 Summary zFOL is a general-purpose representation language based on objects and relations zBNF of FOL zA logical agent using FOL zSituation calculus to handle changes zCausal rules are often more flexible and entail a wider range of consequences zWe’re ready to infer in FOL...


Download ppt "First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7."

Similar presentations


Ads by Google