Nonmonotonic Reasoning&Reasoning about Actions
1. Nonmonotonic Reasoning ? Review of NMR (CWA, Predicate Completion) ? Circumscription 2. NMR and Reasoning about Action ? Situation Calculus ? Frame Problem
Often KBs contain incomplete knowledgeE.g., Airline database flight(NYC,Boston,TWA) flight(NYC,Chicago, United) Does not include all the non-existent flights ?flight(NYC,Kalamazoo,TWA) ...This can lead to the correct model as well as multiple unintended models flight(NYC,Boston,TWA) flight(NYC,Boston,TWA) flight(NYC,Boston,TWA) flight(NYC,Chicago, United) flight(NYC,Chicago, United) ? ? ? flight(NYC,Chicago, United) ?flight(NYC,Kalamazoo,TWA) flight(NYC,Kalamazoo,TWA) ?flight(NYC,Kalamazoo,TWA) ?flight(NYC,Kalamazoo,United) ?flight(NYC,Kalamazoo,United) flight(NYC,Kalamazoo,United) ?flight … ?flight … ?flight … flight … flight … Unintended models make classical logic and deduction inadequate for addressing many of the reasoning tasks we would like to perform.In many instances there are conventions for dealing with this incomplete knowledge.NMR strives to identify these conventions and to formalize them in order to define - intended semantics for KBs- procedural semantics for alternate inference systems (like NAF in Prolog)
Previous lecture examined 3 NMR formalisms.Each captured a NMR convention for interpreting a KB by adding formulae to the KB to eliminate the unintended models.Recall that “adding something” enables us to define the correct semantics. In practice we may instead elect not to alter our KB, but rather to achieve the intended interpretation procedurally.CWAConvention: “If I can’t prove it’s true from what’s in my KB then it’s false”, I.e., From KB ?? P(t) infer ? P(t) Result: Assigns true/false to every ground predicate instance in the KB. Minimizes the number of predicates that are true. Applications: completing databases, KBs, ...Syntactic restrictions: only works for Horn clauses (+ a few other special cases)Caveat: Strong form of closure.
Predicate CompletionConvention: “The information given about a predicate P is all and only the relevant information about P”, I.e., the information about P is necessary as well as sufficient.Result: Establishes truth/falsity of every instance of predicate P in the KB. Minimizes the instances of predicate P to those that are forced to be true by the KB.Applications: various, e.g., default reasoning, taxonomic reasoning (e.g., minimize ab), abductive reasoning, ...Syntactic restrictions: only works for Solitary clauses (+ a few other special cases)Comment: Is subsumed by circumscription. Collapses to CWA in certain instances.
CircumscriptionConvention: “Minimize the extent of P.” (I.e., the only instances of P that hold are those that are forced to hold.)Result: Establishes truth/falsity of every instance of predicate P in the KB. Minimizes the instances of predicate P to those that are forced to be true by the KB.Applications: various, e.g., reasoning about action, default reasoning, taxonomic reasoning (e.g., minimize ab), abductive reasoning, ...Syntactic restrictions: arbitrary formulae, but only first-order definable for certain syntactic classes of KBs.Caveat: Second order in the general case.Comment: Same basic convention as predicate completion but may be applicable to a much broader class of KBs. Many different types of circumscription (e.g., predicate circumscription, variable, parallel, prioritized, pointwise)
Circumscription is based on the notion of minimal models.E.g., KB= bird(Tweety) ? bird(Ralph) Assume our universe only contains Tweety and Ralph. Then there are 3 models: bird(Tweety) ? bird(Tweety) bird(Tweety) ?bird(Ralph) bird(Ralph) bird(Ralph)There are 2 minimal models. This model is not minimal in predicate bird.Intuitive description:Circumscription transforms KB into a stronger sentence, CIRC(KB;P) such that the models of CIRC(KB;P) are precisely the desired minimal models.As with predicate completion, circumscription ? minimizes occurrences of one or more predicates. ? computes a formula that captures our assumptions and adds it to KB.So what formula are we adding? We’re adding a circumscription axiom schema for P.
CIRC(KB; P) ? KB + P’s circumscription axiom schemaSchema imposes additional constraint on KB: P’s extension is minimal. I.e., P is true only when KB forces it to be!P’s circumscription axiom schema:(?P*. ( KB(P*) ? (?x.P*(x) ? P(x)) ) ? (?x.P(x) ? P*(x)) ) Tweety Ralph P* P ? P P* Ralph Tweety P* satisfies the same constraints as P in KB Those x’s that satisfy P* are a subset of those that satisfy P Those x’s that satisfy P are a subset of those that satisfy P* I.e., if P* is any predicate satisfying P’s axioms, then P*’s extensions cannot be smaller than P’s.
Abbreviations: P* ? P is an abbreviation for (?x.P*(x) ? P(x)) P* ? P is an abbreviation for (P* ? P) ? ? (P ? P*) P* ? P is an abbreviation for (P* ? P) ? (P ? P*) The axiom schema?P*. ( KB(P*) ? (?x.P*(x) ? P(x)) ) ? (?x.P(x) ? P*(x)) can be rewritten as ?P*. KB(P*) ? ? (P* ? P) which can be rewritten as ? (?P*. KB(P*) ?(P* ? P)) Hence, CIRC(KB;P) ? KB(P) ? ? (?P*. KB(P*) ?(P* ? P))
Bad News: • Circumscription axiom is second-order (quantifying over predicates). • When CIRC(KB;P) is not first-order definable ? no theorem prover. Good News: • Applicable to arbitrary first-order theories. • Sometimes CIRC(KB;P) is first-order definable. • Systematic procedures for computing CIRC(KB;P) sometimes.
E.g., KB(bird) = bird(Tweety) ? ?x. (ostrich(x) ? bird(x)) ? ? ostrich(Sam)Task: Compute CIRC(KB; bird)Circumscription Axiom: ?bird*. ( KB(bird*) ? (?x.bird*(x) ? bird(x)) ) ? (?x.bird(x) ? bird*(x)) ) Magically choose bird*= x=Tweety ? ostrich(x)This is a formula that satisfies the constraints of the predicate bird in KB and whose extent is not smaller that the extent of bird.…. “Magic” is not a reasonable way to compute circumscription.For certain syntactically restricted KBs, there are systematic methods for computing circumscription.
Circumscription is first-order definable and can be systematically computed for formulae solitary in P. Recall, a clause is solitary in P if, whenever it contains a positive occurrence of P, it contains only one occurrence of P. Hence, we can say that a formula is solitary in P if it can be written in the following normal form N[P] ? (E ? P) N[P] is a formula containing no positive occurrences of P E is a formula containing no occurrences of P E ? P is an abbreviation for (?x.E(x) ? P(x)) CIRC(N[P] ? (E ? P) ; P) ? N[E] ? (E ? P) , where N[E] is N[P] with each occurrence of P replaced by EObserve: Circumscription gives the same result as predicate completion does in the special case of conjunctions of clauses solitary P, these reduce to (E ? P)
CIRC(N[P] ? (E ? P) ; P) ? N[E] ? (E ? P) E.g., KB(On)= ?x. ?On(A,x) ? On(A,B) N[On] = ( ?x. ?On(A,x) ) (E ? On) = (?x?y.x=A ? y=B ? On(x,y)) E= ?x?y.x=A ? y=B CIRC(KB;On) = (?x. ? (x=B)) ? (?x?y.On(x,y) ? x=A ? y=B)“The only thing ‘on’ something is the object denoted by A and it is on the object denoted by B, and there is at least one object that is not the same as the one denoted by B.”Systematic procedures exist for computing circumscriptions for other classes of KBs -- see the literature for details.
“Predicate” circumscription will not result in any new positive instances of P …or for that matter of any other predicates. ? sometimes predicate circumscription doesn’t give us what we wantE.g., KB= (block(x) ? ? ab(x) ? ontable(x)) ? ?ontable(B1) ? block(B1) ? block(B2) ? B1 ? B2Task: Want to infer ontable(B2), but currently, KB ?? ontable(B2) and KB ?? ? ontable(B2)Let’s see what happens if we compute CIRC(KB; ab)KB solitary in ab ? circumscription is equivalent to predicate completion Rewrite block(x) ? ? ab(x) ? ontable(x) as block(x) ? ? ontable(x) ? ab(x) CIRC(KB;ab) ? (COMP;P) ? block(x) ? ? ontable(x) ? ab(x) ? ?ontable(B1) ? block(B1) ? block(B2) ? B1 ? B2Failure: (CIRC;ab) ?? ontable(B2) and (CIRC;ab) ?? ? ontable(B2) (CIRC;ab) cannot force ontable(B2) -- it’s new positive information.
Predicate Circumscription Convention: “minimize P without changing anything else in the model.” I.e., it keeps everything else fixed. Variable Circumscription Convention: “minimize P and let certain other designated predicates vary.” I.e., allow other predicates’ extent to grow, if it minimizes P. Variable Circumscription Definition: Circumscribe P in KB, allowing Z to vary: CIRC(KB;P;Z) = KB(P,Z) ? ? (?P*Z*. KB(P*,Z*) ? (P* ? P)) In our example, variable circumscription will enable us to make the extent of ab smaller at the expense of making the extent of ontable larger.
Once again, there are other syntactic classes of KBs for which circumscription is first-order definable and can be systematically computed. Computing circumscripton for formulae that are solitary in Z. CIRC(N[Z] ? (E ? Z) ; P; Z) ? N[Z] ? (E ? Z) ? CIRC(N(E); P)where N has no positive occurrences of Z, and E has no occurrences of Z. E, P, and Z can be tuples of predicatesReturning to our ExampleE.g., KB= (block(x) ? ? ab(x) ? ontable(x)) ? ?ontable(B1) ? block(B1) ? block(B2) ? B1 ? B2Task: Want to infer ontable(B2), but currently, KB ?? ontable(B2) and KB ?? ? ontable(B2)Let’s see what happens if we compute CIRC(KB; ab; ontable) N[ontable] = ?ontable(B1) ? block(B1) ? block(B2) ? B1 ? B2 (E ? Z) = block(x) ? ? ab(x) ? ontable(x)CIRC(KB; ab; ontable) ? N[ontable] ? (E ? Z) ? CIRC(( (? block(B1) ? ab(B1)) ? block(B1) ? block(B2) ? B1 ? B2); ab) Hence CIRC(KB; ab; ontable) ? KB ? (ab(x) ? x=B1)
Logical Foundations of Artificial Intelligence (Chapter 6)by Genesereth and Nilsson, 1988Handbook of Logic in Artificial Intelligence and Logic ProgrammingVolume 3, Nonmonotonic Reasoning and Uncertain Reasoning(Chapter 6 by Lifschitz), 1994Nonmonotonic Reasoningby Brewka, Dix and Konolige, 1997
? Nonmonotonic Reasoning ? Review of NMR (CWA, Predicate Completion) ? Circumscription ? NMR and Reasoning about Action ? Situation Calculus ? Frame Problem
Representing and reasoning about actions supports ? predicting the evolution of the world ? planning (e.g., robots) ? user modeling ? communication (e.g., speech acts) ? diagnosis and repair ? …There are several formalisms for reasoning about action. ? Some logic-based e.g., situation calculus, event calculus, A languages,... ? Some tailored to specific planning procedures e.g., STRIPS,...
do(fix(Pump,do(turnOff(Pump,S0)))) do(turnOff(Pump,S0)) S0 do(turnOn(Boiler,S0)) The Tree of Situations
? Sorted first-order language for representing changing worlds. ? fluents -- predicates whose truth value changes from situation to situation. E.g., on(Pump,s), steam(s), AB(boiler,s) ? world dynamics specified by effect axioms. E.g., Poss(a,s) ? a=turnOn(Pump) ? on(Pump,do(a,s)) ? preconditions for actions specified by necessary conditions for actions. E.g., Poss(fix(Pump),s) ? off(Pump,s)
To represent the dynamics of a system, we include1. Effect axioms Poss(a,s) ? a=turnOn(Pump) ? on(Pump,do(a,s)) Poss(a,s) ? a=turnOff(Pump) ? ?on(Pump,do(a,s)) Poss(a,s) ? a=burnOut(Pump) ? broken(Pump,do(a,s)) Poss(a,s) ? a=fix(Pump) ? ?broken(Pump,do(a,s)) ... 2. Necessary conditions for actions Poss(fix(Pump),s) ? ?on(Pump,s) ...3. What is known of the initial situation, S0 on(Pump,S0), ?AB(Boiler, S0 ), … 4. Unique names assumption for actions turnOff(x) ? burnOut ? ...
3 problems that plague formal representations of action:The Frame Problem: How to characterize what does not change after an action is performed.The Qualification Problem: How to characterize the necessary and sufficient conditions for actions.The Ramification Problem: When state constraints are combined with the action representation, how to characterize the indirect effects of actions.Solution criteria: parsimony, elaboration tolerance, flexibility,...
Assume (for simplicity) that S0 is completely specified, so there is one model wrt S0 E.g., on(Pump,S0) ?broke(Boiler, S0 ) on(Boiler, S0) ?broken(Pump, S0 ) Suppose the action turnOff(Pump) is performed, transitioning the system to a new situation, do(turnOff(Pump, S0), which we will abbreviate to S1. From the effect axiom Poss(a,s) ? a=turnOff(Pump) ? ? on(Pump,do(a,s))we know that the pump will be ?on in S1, but what is the truth value of other fluents?Intended Model ? on(Pump, S1) ?broken(Boiler, S1 ) on(Boiler, S1) ?broken(Pump, S1) Numerous Unintended Models? on(Pump, S1) broken(Boiler, S1 ) on(Boiler, S1) ?broken(Pump, S1) ? on(Pump, S1) broken(Boiler, S1 ) ? on(Boiler, S1) ?broken(Pump, S1) (etc.) ? ? ?
Desired Convention: Inertia, i.e., minimize change. “Nothing changes unless our effect axioms say that it must.”Solution 1: frame axiomsAdd frame axioms to characterize the non-effects of actions.E.g., Poss(a,s) ? a=turnOn(Pump) ? ? on(Boiler,s) ? ? on(Boiler,do(a,s)) Poss(a,s) ? a=turnOn(Pump) ? on(Boiler,s) ? on(Boiler,do(a,s)) Poss(a,s) ? a=turnOn(Pump) ? broken(Pump,do(a,s)) ? broken(Pump,do(a,s)) ...Problem: Not parsimoniousThere are many more non-effects of actions than effects.Assuming n actions, m fluents, implies approx. nxm frame axioms!
Solution 2: Successor State AxiomsStep 1 - Define general effect axioms for each fluent F Poss(a,s) ? ?F+(a,s) ? F(do(a,s)) suppressing action and state args. Poss(a,s) ? ?F-(a,s) ? ?F(do(a,s)) E.g., Poss(a,s) ? a=turnOn(Pump) ? on(Pump,do(a,s)) Poss(a,s) ? a=turnOff(Pump) ? ?on(Pump,do(a,s))Step 2 - Make a Completeness AssumptionAssume that the effect axioms characterize all the conditions under which an action a can lead to F becoming true (or false) in the successor state.Step 3 - Add Explanation Closure Axioms for each fluent FStep 2 justifies adding explanation closure axioms to the effect axioms. Poss(a,s) ? ? F(s) ? F(do(a,s)) ? ?F+(a,s) Poss(a,s) ? F(s) ? ?F(do(a,s)) ? ?F-(a,s) E.g., Poss(a,s) ? ?on(Pump,s) ? on(Pump,do(a,s)) ? a=turnOn(Pump) Poss(a,s) ? on(Pump,s) ? ?on(Pump,do(a,s)) ? a=turnOff(Pump)
Step 4 - Rewrite as Successor State Axioms for each fluent FThe effect axioms can be rewritten as successor state axioms.Poss(a,s) ? [F(do(a,s)) ? ?F+(a,s) ? (F(s) ? ? ?F-(a,s))]F is true in the situation resulting from performing action a in situation s iff either the positive effect axiom made it true or it was true in the previous situation and the negative effect axiom didn’t make it falseE.g., Poss(a,s) ? [on(Pump,do(a,s)) ? a=turnOn(Pump) ? (on(Pump,s) ? a?turnOff(Pump)]Merits of Successor State Axiom Solution: ? captures the non-effects of actions for the provided representation. ? parsimonious: one successor state axioms per fluent. ? closed-form: no need for further computation. ? independent semantic justification: equivalent to a circumscriptive minimization of ab(F, a), where ab is an abbreviation for ? [F(s) ? F(do(a,s))] ? can be realized procedurally in Prolog by exploiting Prolog’s completion semantics.
The Frame Problem: How to characterize what does not change after an action is performed.We examined the problem in the situation calculus formalism. ? Adding frame axioms to solve the frame problem is not parsimonious. ? Under a completeness assumption, compiling effect axioms into successor state axioms solves the frame problem for the provided representation. ? The successor state axiom solution is semantically justified by an independent circumscriptive minimization policy. ? This solution to the frame problem can be realized procedurally in Prolog by exploiting Prolog’s completion semantics.
Email: fikes@ksl.stanford.edu
Download presentation source