Reasoning about Concurrent Actions and ...

1 downloads 0 Views 82KB Size Report
Universidade Nova de Lisboa. 2825 Monte da Caparica, Portugal. {renwei | lmp}@di.fct.unl.pt. Presented in AGP'96, San Sebastian, Spain. August 15 - 18, 1996.
+

+

Reasoning about Concurrent Actions and Observations

Renwei Li and Lu´ıs Moniz Pereira Department of Computer Science Universidade Nova de Lisboa 2825 Monte da Caparica, Portugal

{renwei | lmp}@di.fct.unl.pt

Presented in AGP’96, San Sebastian, Spain August 15 - 18, 1996

+

1

+

+

Action description language A (by Gelfond and Lifschitz)

F after A1; . . . ; Am initially F A causes F if P1; . . . ; Pn A causes F

A domain description is a set of value propositions and effect propositions. The semantics is defined by using states and transitions.

+

2

+

+

Stolen Car Problem D1 (by Kautz)

initially ¬Stolen Stolen after W ait; W ait; W ait Steal causes Stolen

It can be shown that the above domain description has no model. But why? In order to solve the problems such as SCP, we need to extend the action language A with concurrent actions, and to express incomplete knowledge about the past history.

+

3

+

+

Purposes of this talk:

• extend A with concurrent actions;

• extend A with observation propositions;

• Translation of domain descriptions into abductive logic programs;

• Diagnose domains when expected behaviour is in disagreement with observed behaviour.

+

4

+

+

Concurrent action: A finite nonempty set of primitive actions. How should we define semantics of concurrent actions? General observation: the effects of a concurrent action is aggregation of effects of its primitive actions. Example: Switch a light and open a door. But ... what’s about primitive actions with confliting effects? Example: Open and close the same door at the same time.

+

5

+

+

Lin-Shoham’s solution: After you open and close the same door at the same time, the door keeps unchanged. Baral-Gelfond’s solution: After you open and close the same door at the same time, the resulting situation does not exist, and all successive actions are disabled. Our solution: After you open and close the same door at the same time, the status of the door is not known (for the moment).

+

6

+

+

Action Description Langauge AC . Primitive action alphabet ΣA. Fluent name alphabet ΣF . The syntax of AC is the same as that of A except an action is defined to be a finite nonempty set of primitive actions. Example: Yale Shooting Problem (Hanks and McDermott):

DY SP =

  initially       initially       

+

       

¬Loaded. Alive. Shoot causes ¬Alive if Loaded.    Shoot causes ¬Loaded.     Load causes Loaded

7

+

+

Semantics of AC A state σ is a pair of sets of fluent names hσ +, σ −i such that σ + and σ − are disjoint, i.e., σ + ∩ σ − = ∅. A transition function Φ is a mapping from the set of pairs (A, σ), where A is an action expression and σ is a state, into the set of states. A structure is a pair (σ0, Φ), where σ0 is a state, called the initial state of the structure, and Φ is a transition function. The rest of it needs 8 –15 minutes to explain, as it is a little complicated and technical. Read the paper afterwards if you want to know more.

+

8

+

+

Abductive logic programming Abductive normal logic programming framework: (P, A, I), where P is a set of normal logic programming rules, A a set of abducibles, and I a set of integrity constraints. The semantics of an abductive normal logic program is defined to be the union of the integrity constraints and the first-order theory by completing the non-abducible predicates together with Clark’s Equality Theory. For all the acyclic logic programs, the predicate completion semantics coincide with other semantics such as the stable model semantics and the well-founded model semantics.

+

9

+

+

Translation into abductive logic programs

1. Auxiliary predicates about subactions: Assume that we have standard rules for setrelated predicates Subseteq(S1, S2) and M ember(A, S), by which we can define subacteq(S1, S2) and subact(S1, S2) about subactions.

2. Initialization: Let s0 be a new symbol to denote the initial situation. is true(F, s0) is f alse(F, s0)



initially true(F ).



initially f alse(F ).

3. Auxiliary Predicates: These auxiliary predicates will be used to define the two main predicates is true(F, S) and is f alse(F, S), which indicate whether fluent F is true or false in situation S. +

10

initiates(A, F, S) ← imm initiates(A, F, S). initiates(A, F, S) ← subacteq(B, A), imm initiates(B, F, S), not clip initiates(F, B, A, S). terminates(A, F, S) ← imm terminates(A, F, S) terminates(A, F, S) ← subacteq(B, A), imm terminates(B, F, S), not clip terminates(F, B, A, S). causes(F, S, A, B) ← subacteq(B, A), imm initiates(B, F, S), not clip initiates(F, B, A, S), not clip Cause1(F, B, A, S). causes(F, S, A, B) ← subacteq(B, A), imm terminates(B, F, S), not clip terminates(F, B, A, S), not clip Cause2(F, B, A, S).

delta(A, S, F ) ← initiates(A, G, S), terminates(A, G, S), causes(G, S, A, B), initiates(B, F, S). delta(A, S, F ) ← initiates(A, G, S), terminates(A, G, S), causes(G, S, A, B), terminates(B, F, S).

+

+

4. Main Predicates: The following predicates are used to determine whether a fluent is true or false in a situation. is true(F, result(A, S)) ← is true(F, S), not delta(A, S, F ), not terminates(A, F, S). is true(F, result(A, S)) ← initiates(A, F, S), not delta(A, S, F ), not terminates(A, F, S). is f alse(F, result(A, S)) ← is f alse(F, S), not delta(A, S, F ), not initiates(A, F, S). is f alse(F, result(A, S)) ← terminates(A, F, S), not delta(A, S, F ), not initiates(A, F, S).

+

11

+

+

5. Domain-Specific Predicates The syntax and semantics of the following predicates depend on domain descriptions. Let F ∈ Σf be a fluent name. We write holds(F, S) and holds(¬F, S) to stand for is true(F, S), and is f alse(F, S), respectively.

• For a causes f if p1, . . . , pn in D, where f is positive: imm initiates(a, f, S) ← holds(p1, S), . . . , holds(pn, S). • For a causes ¬f if p1, . . . , pn, where f is positive: imm terminates(a, f, S) ← holds(p1, S), . . . , holds(pn, S).

+

12

+

+

Integrity constraints, ICD , is defined as follows: For each value proposition F after A1; . . . ; Am, we have: holds(F, result(A1; . . . ; Am, s0)) Proposition 1 πD is an acyclic program with first-order constraints in the sense of Apt. Corollary 2 For πD, COM P (πD) coincides with its generalized stable model semantics and generalized well-founded model semantics.

+

13

+

+

Theorem 3 (Soundness) Let D be any domain description. For any value proposition Q, if COM P (πD) |= πQ, then D entails Q. Theorem 4 (Completeness) Let D be a domain description. For any value proposition Q, if D entails Q, then COM P (πD) |= πQ. Thus, proof of entailments in AC is reduced to queries in logic programming. In our work we have experimented it with our belief revision system REVISE which uses the WFSX semantics. The use of REVISE is not essential, since the major semantics of πD coincide.

+

14

+

+

Observations

observed F after A1; . . . ; Am An observation tells observed practical behaviour, while a domain description tells the ideal behaviour. Whenever there is a discrepancy between them, there is a diagnosis problem. Domain Description

Diagnostic Explanation

Actual Domain

6

?

Predicted Value Propositions

+

?

Differences of Propositions

-

Observed Value Propositions

15

+

+

Diagnosis Problem D — domain description OBS = { observed Q1, . . . , observed Qm} Let OV P = {Q1, . . . , Qm}. We call (D, OBS), or simply (D, OV P ), a diagnostic domain. We also say that there is a diagnostic explanation problem, or simply diagnosis problem, for the domain iff D ∪ OV P is inconsistent. Expansion Let f after a1; . . . ; am and f after b1; . . . ; bm be two value propositions. The latter is an expansion of the former iff for every 1 ≤ i ≤ m, ai ⊆ bi. Expansion Let P1 and P2 are two sets of value propositions. P2 is said to be an expansion of P1 iff (i) for every Q1 of P1 there is a Q2 in P2 which is an expansion of Q1; and (ii) every Q02 of P2 is an expansion of a Q01 of P1. +

16

+

+

Diagnostic explanation A diagnostic explanation for (D, OV P ) is a set of value propositions E such that (i) D ∪ E is consistent; (ii) E is an expansion of OBS. Example: the following three sets are diagnostic explanations for the SCP diagnostic domain Dscp ∪ OBSscp: E1 = {Stolen after {Steal, W ait}; W ait; W ait} E2 = {Stolen after W ait; {Steal, W ait}; W ait} E3 = {Stolen after W ait; W ait; {Steal, W ait}} Any of E1, E2, E3 will explain why the car is missing in the parking lot.

+

17

+

+

Preferred Explanation Suppose E1 and E2 are two diagnostic explanations for (D, OV P ). We say that E1 is preferred to E2 iff E2 is an expansion of E1. A diagnostic explanation E for (D, OV P ) is said to be most preferred iff for any diagnostic explanation E 0 for (D, OV P ) if E 0 is preferred to E, then E = E 0. Translation into abductive logic programs occ(A, S1, S2) — A occurs in situation S1 and leads to the situation S2 possibly together with some other actions. Abducible predicate: happens(A, S1, S2)

+

18

+

+

πOBS consists of a set of logic programming rules POBS and a set of integrity constraints ICOBS , defined as follows:

1. For each observed f after a1; a2; . . . ; am: occ(a1, s0, sa1 ) ← ... occ(am, sa1;a2;...;am−1 , sa1;a2;...;am ) ← And adding the following into ICOBS as a constraint: f alse ← not holds(f, sa1;a2;...;am )

2. We add the following additional rules for occ/3: occ(A, S1, S2) ← atomic(A), happens(A, S1, S2) where atomic(A) denotes that A is an atomic action, i.e. A ∈ Σa. +

19

+

+

For a given diagnostic domain (D, OBS), its translation is defined to be πD ∪ πOBS. πD ∪ πOBS is still an acyclic program with first-order constraints. We can use an abductive query procedure to generate abductive answers to queries. In particular, an abductive answer, if any, may be generated for the query ← ¬f alse. If such an answer ∆ exists, the theory COM P (PD ∪ POBS ) ∪ ICD ∪ ICOBS ∪ ∆ is consistent.

+

20

+

+

Explanation Soundness Let (D, OBS) be a diagnostic domain. If there exists ∆H such that πD ∪ πOBS ∪ ∆H is consistent, then there is a diagnostic explanation E for (D, OBS). Explanation Completeness Let (D, OBS) be a diagnostic domain. Let E be a diagnostic explanation. Then, there is a ∆H such that πD ∪ πOBS ∪ ∆H is consistent. If D ∪ OV P is consistent, then there is an abductive answer ∆ to ← ¬f alse such that no atoms of the form happens(a, si, sj ) appear in ∆.

+

21