Variants of Plan Generation for Complex Dynamic ... - Semantic Scholar

2 downloads 0 Views 182KB Size Report
GL87] Michael P. George and Amy L. Lansky. Reactive reasoning and planning. In Proc. AAAI{87, pages 677{682, 1987. JA95a] Klaus P. Jantke and Oksana ...
Variants of Plan Generation for Complex Dynamic Systems Klaus P. Jantke

Hochschule fur Technik, Wirtschaft und Kultur Leipzig (FH) Fachbereich Informatik, Mathematik & Naturwissenschaften P.O.Box 66, 04251 Leipzig, Germany [email protected]

Oksana Arnold

Universitat Leipzig, Wirtschaftswissenschaftliche Fakultat Institut fur Wirtschaftsinformatik Marschnerstr. 31, 04109 Leipzig, Germany [email protected]

Abstract: There is developed an approach to therapy plan generation for complex dynamic processes. This approach has a rm theoretical basis in graph theory using several concepts of hierarchically structured graphs. The underlying theoretical concepts are of a particular importance for developing, investigating, and implementing several heuristics intended to improve the quality of planning algorithms. It is the authors' key intention to explain in detail the way from formal concepts to original algorithmic solutions. The approach is implemented both in Allegro Common LISP and in Quintus Prolog under SUN/OS on SPARC stations. In addition to the running plan generation algorithms interacting with several other components, there are particular tools supporting research work like a plan tracer, e.g.

1 Motivation and Introduction The present paper deals with problems of therapy plan generation for complex dynamic systems. It reports about a couple of theoretical approaches underlying implementations and applications developed within the BMFT joint research project Wiscon. The focus is on theoretical concepts for innovative applications. Roughly speaking, there is developed a quite theoretical approach to plan generation in rapidly changing dynamic environments which leads to a couple of original planning algorithms. Variants of the core algorithm have been implemented in Lisp and Prolog. They have been tested successfully. It is the authors' key intention to illustrate the way from very formal and mathematically well-based investigations to running applications: The exploitation of the graph-theoretic concepts invoked will lead to a collection of heuristics which have not been developed in therapy planning before. For meeting this target of the presentation, the main part of the paper is clearly separated into a chapter dealing with background concepts and another chapter developing the algorithmic ideas and very brie y reporting their implementation and application. Preceding these two main chapters, there is a brief explanation of the peculiarities of the present approach. This includes a very short characterization of typical application domains as well as a sketch of the underlying knowledge processing approach. Due to the lack of space, we have to refer to [AJ94a], [AJ94b], [AJ94c], [Arn94], [JA95a], [AJ95], and [MJA95], for more details including a couple of illustrations.

2 The Therapy Plan Generation Framework 2.1 Complex Dynamic Processes

The intended application domain is roughly circumscribed by the target processes underlying the Wiscon project development. There are certain peculiarities characterizing the class of complex dynamic processes under consideration. First, these peculiarities are re ected by both the knowledge representation formalisms used and by the information contents actually represented. Second, they have a serious impact on the power and limitations of advanced reasoning processes like diagnosis and therapy. We con ne ourself to the key characteristics and direct the reader to [AJ94b] for a comprehensive discussion. The class of target processes under consideration is characterized by crucial properties:  Values of process parameters can usually be in uenced only indirectly. Thus, the impact of control actions (understood as postconditions) can rarely be uniquely determined.  For certain process parameters necessary to specify the state of an installation, values may not be accessible. This may be due to missing knowledge about some parameters, to missing or much to expensive methods of measuring.  Performing control actions usually depends on auxiliary ressources the availability of which may depend on unforeseeable situations.  The structure of the given equipment may determine the necessity of simultaneous actions. As a consequence, the available knowledge is inherently incomplete. There is no hope to represent actions by Strips-like operators, as the concept of postconditions does not t, in general. Plans can rarely be reduced to sequences of actions. Also parallelism or concurrency of actions is not expressive enough, if proper simultaneity is required. In addition to these key characteristics, processes of the target class under consideration usually share some further properties which are less peculiar, but which have a serious impact on the overall diculties of knowledge representation and processing, as well (cf. [AJ94b]).

2.2 Knowledge-Based Monitoring and Control

A therapy control in engineering is some ordering of control actions (a therapy plan in order to in uence the technical process in timely response). It's aim is to remove the causes of a detected disturbance, to perform a new control regime to minimize the losses of production, and to adopt the situation recognition which monitors alarm boundaries. These tasks should be done by both sending new setpoint values, control values, and alarm boundaries to a conventional supervision and control system as well as informing the operator about some mechanical measures (cf. [Fri93], e.g.). Therefore, the corresponding control synthesis modules have to be embedded into comprehensive knowledge-based systems integrating process supervision, diagnosis, simulation, planning, and plan execution, among others. In dependence on the discovered fault, the current reserves of the system,

and the state of the process the control synthesis should derive and execute an appropriate therapy plan (cf. [AJ94b], [AJ94c], [Arn94], [JA95a], [AJ95], and [MJA95], for further details). Thus, therapy plans are formal objects having some operational semantics in the process under consideration. They are programs. These aspects are particularly investigated in [AJ94a] and [JA95b]. Goal Specification Inconsistent Operators

Therapy Planner

Action Operators

(incl. Plan Revision)

Selected Operators

Constraint Generated Plan

Failed Operators Constraint Violations

Monitoring

Plan Execution

Rule Bases

(by Rule Interpreter) Control Sequences

Activated Operators

Values of Parameters (Dynamic Knowledge)

Figure 1: The Therapy Planning and Execution Architecture The gure above is depicting the internal structure of our planning system. In the following main part of the paper, there will be introduced the underlying theoretical concepts and their use for designing variants of planning algorithms. Emphasis is put on the development of non-standard algorithms properly based the theoretical concepts introduced. Both theoretical estimations of the merits of particular algorithms (in terms of complexity theory, for instance) and practical measurements by frequent and systematic applications are quite another research issue.

3 Fundamentals of Therapy Plan Generation 3.1 Knowledge about Therapy and Planning

Knowledge on the object level contains information about particular repair actions to be invoked during therapy. There is a language of action scripts as designed in [MAM92] and [Arn92] to represent this type of knowledge. Additionally, there is metaknowledge about assembling plans from elementary action scripts and about properties of those plans. The underlying concepts are described in [AJ94a], and the other references cited. Last but not least, the second author has developed some particular temporal logic (cf. [Arn94]) invoked everywhere in the present approach where logical conditions have to be considered.

3.2 Hierarchically Structured Plans

There is a huge variety of approaches to plans and planning in recent AI. This Babylonian situation has motivated us to strive for a mathematically precise and intuitively lucid approach meeting our needs. We have developed an approach (cf. the references above) based on hierarchically structured graphs. Our concepts explained in the sequel are slightly di erent from pin graphs and hierarchically structured cellular graphs known in complexity theory. But we adopt principal ideas. Graph-theoretic fundamentals are assumed. De nition 1

A hierarchically structured family of plans is a nite set F = fG ; : : : ; Gkg of pin graphs Gi = [Vi; Ei; Piin ; Piout; Ci; subi] such that for every i 2 f1; : : : ; kg we have: 1. Gi0 = [Vi; Ei] is a nite, directed, acyclic graph with the set of vertices Vi and the set of edges Ei . 2. Piin [ Piout are called the pins of Gi with Piin; Piout  Vi and are de ned by (a) Piin = f v j v 2 Vi ^ :9u 2 Vi ( (u; v) 2 Ei ) g (b) Piout = f v j v 2 Vi ^ :9u 2 Vi ( (v; u) 2 Ei ) g (c) The vertices in Ci  Vi are understood to be compound which are substituted later. (d) subi : Ci ! 2f ;:::;kg n; is a mapping indicating which graphs Gj may substitute the compound nodes in Ci. 2 For every hierarchically structured family of plans F , there is a substitution ordering F on fG ; : : :; Gk g indicating which graphs can be substituted into each other according to fsubigi :::k . This ordering is simply de ned such that Gi F Gj holds, if and only if 9c 2 Ci ( j 2 subi(c) ). The transitive closure of F is denoted by F . 1

1

1

=1

+

De nition 2

Assume any hierarchically structured family of plans F = fG ; : : :; Gk g, any Gi 2 F , any c 2 Ci, and any j 2 subi(c). The substitution of Gj in Gi at c 2 Ci yields another pin graph denoted by Gi[c - Gj ] = [V; E; P in; P out; C; sub] and de ned as follows. 1. V = ( Vi n fcg ) [ c:Vj 2. E = ( (Ei [ c:Ej ) n (Vi  fcg [ fcg  Vi ) ) [ ((fv j (v; c) 2 Eig  c:Pjin) [ (c:Pjout  fv j (c; v) 2 Ei g) ) 3. C = ( Ci n fcg ) [ c:Cj 4. sub = ( subi n f(c; subi(c))g ) [ c:subj 2 The speci cation of P in and P out, which are de ned implicitly, can be dropped, for shortness. For building the disjoint union of sets of nodes, any given node d 2 Vj , when substituted among others for some node c 2 Ci, will be renamed to c:d and, when V denotes any set of nodes, one de nes c:V = f c:d j d 2 V g. Substitution as above determines some rewrite relation )F among pin graphs. For any two pin graphs G and 1

G 0, one writes G )F G 0 if and only if there exists some Gj 2 F with G 0 = G [c - Gj ]. By )F we denote the transitive closure of )F . If any graph G is irreducible (in normal form) w.r.t. )F , this is denoted by G #F . Al+

+

though there are interesting issues of rewriting, here is not enough space to discuss these details. De nition 3

We assume any hierarchically structured family of plans F = fG ; : : : ; Gkg and any Gi 2 F . All normal forms of Gi w.r.t. )F are called the plans speci ed by Gi via F . For any distinguished pin graph Gi 2 F , R = [F ; Gi] is called a rooted family, if and only if 8Gj 2 F ( Gi 6= Gj ) Gi F Gj ). For any rooted family P = [F ; Gi], P is called a hierarchically structured plan, if and only if Gi has a uniquely de ned normal form G  w.r.t. )F . Recall that G  is a plan. 2 1

+

+

+

Given any goal speci cation Gi, the current search space is some rooted family R = [F ; Gi]. The immediate result of planning is a hierarchically structured plan P constructed as a restriction of R. Its normal form G  is used for plan execution. And if plan revision becomes necessary, this is performed within R based on P . The key concept based on logical considerations is consistency (cf. [Arn94]) introduced to complement executability. For shortness, it is introduced only informally. De nition 4

For any knowledge base TR and any two time points t ; t , every substitution mapping sub may be reduced to only those substitutions which are consistent with TR, i.e. an index j is removed from subi(c) exactly if there is some start or interval constraint ' that must be violated during the expected execution interval [ t ; t ), i.e. TR j= t1;t2 :' . The 2 reference i to the corresponding graph is dropped to allow the notation subcons t1 ;t2 (c) . 1

2

1

2

[

)

[

]

Following the notions and notations introduced above, we are able to specify desirable properties of plans in the class of domains under consideration. Adequate planning algorithms are expected to generate plans as speci ed.

4 Variants of Therapy Planning Algorithms The following rst variant is our core algorithm developed, implemented, and tested so far (cf. [Arn92], [AJ94a], and [MJA95]). The lucid structure of the basic algorithm allows a number of in-depth discussions. In particular, its recursive structure is quite clear. The crucial call is in line 3.3.2 iv. Logical reasoning is collected in a particular subroutine hidden under the assignment \subcurr (v) := subcons ti ;te  v (v )" in line 3.2. This is quite involved as every total predecessor timeout  (v) is de ned locally within the recent graph under consideration. Node expansion is called at position 3.3.3 ii. There is a local variable G for storing the intermediate version of the therapy plan under construction. [

+ ( )]

algorithm: input: output:

planner1 Gi ; ti ; 000te ; R = [F 0; Gi] P = [F ; Gi]

1. G := Gi 2. P := [F 000; Gi] with F 000 := fGig 3. while C 6= ; do 3.1 A := fv j v active in Gg 3.2 forall v 2 A do subcurr (v) := subcons ti ;te  v (v ) 3.3 while A 6= ; do 3.3.1 nd v 2 A 3.3.2 repeat i j := max subcurr (v) ii subcurr (v) := subcurr (v) n fj g 0 := fG j Gj F 0 Gg iii Fpart 000 ; G ] := planner1( G ; t ; t +  (v ); [F 0 ; G ] ) iv Ppart = [Fpart j j i e j part until subcurr (v ) = ; _ Ppart 6= [;; Gj ] 3.3.3 if Ppart 6= [;; Gj ] [

+ ( )]

+

then i nd Gpart with Gj )+Fpart 000 Gpart ^ Gpart #

ii G := G [v - Gpart] 000 iii F 000 := F 000 [ Fpart iv P := [F 000; Gi]

4. return P

else

i P := [F 000; Gi] with F 000 = ; Figure 2: The Basic Planning Algorithm

A remarkably small modi cation yields a substantially di erent algorithm. This one called planner2 is di erent from the variant before in statement 3.2, only. (Therefore, we display only this crucial line of the algorithm's body in the gure below.) algorithm: input: output:   

  

planner2 Gi ; t ;000R = [F 0; Gi] P = [F ; Gi] 0

3.2 forall v 2 A do subcurr (v) := sub(v)

Figure 3: Excerpt from the Possibly Inconsistent Basic Planning Algorithm We have dropped the requirement to synthesize only those plans which are consistent w.r.t. the underlying technology representation. It is well-known from learning theory (cf.

[JB81] for a couple of related results) that giving up the requirement of consistency may considerably increase the amount of solvable learning problems. Important variants of the basic algorithms result from narrowing nondeterminism. Statement 3.3.1 is a crucial candidate. As above, an excerpt should do. algorithm: input: output:   

  

planner3 Gi ; t ;000R = [F 0; Gi] P = [F ; Gi] 0

3.3.1 nd P v 2 A such that j 2subcurr (v )

j fG j Gj F 0 Gg j is minimal +

Figure 4: Invoking a More Sophisticated Heuristics One may easily imagine combinations of the ideas investigated. However, this needs experimental justi cations. A report about experiments exceeds the available space.

5 Conclusions A closer look at the peculiarities of complex dynamic systems has exhibited the need for planning approaches which di er considerably from classical Strips-like approaches. Although similar environments and underlying hierarchical structures have been under consideration in [GL87] and [Fir92], for instance, none of these approaches has clear theoretical foundations as presented here. Furthermore, all these approaches have not been concerned with consistency and heuristics and, hence, came up with algorithmic solutions similar to our planner2, only. Roughly speaking, the unavoidable vagueness and uncertainty of dynamic knowledge including the problems of unknown durations and imprecisely known e ects of actions leads to an approach which is inductive in spirit. Thus, therapy plan generation is becoming inductive program synthesis. This non-standard view has been introduced in [AJ94a]. For an extended and revised discussion, the interested reader is directed to [JA95b]. The graph-theoretic and logical formalisms developed allow a lucid derivation of variants of therapy planning algorithms. In the authors' opinion, this nicely illustrates the paramount importance of theory for innovative applications of AI. To illustrate the bene t one can draw from a well-developed underlying theory, we point to two main (and opposit) question not investigated in therapy planning, so far: (1) What bene t can be drawn from giving up consistency? (2) How to re ne consistency by reasonably updating the start time taken for trying refutations? These questions are naturally suggested within our framework. We gratefully acknowledge the intensive and stimulating discussions with our students Daniel Kirsten, Torsten Lehmann, Daniel Matuschek, and Christoph Zschiesche on particular aspects of therapy plan generation. Their speci c contributions are continously advancing the overall project. Two anonymous referees gave useful hints.

References

[AJ94a] Oksana Arnold and Klaus P. Jantke. Therapy plan generation as program synthesis. In Setsuo Arikawa and K.P. Jantke, editors, Algorithmic Learning Theory, Proc. 4th International Workshop on Analogical and Inductive Inference (AII'94) and the 5th International Workshop on Algorithmic Learning Theory (ALT'94), October 10-15, 1994, Reinhardsbrunn Castle, Germany, volume 872 of LNAI, pages 40{55. SpringerVerlag, 1994. [AJ94b] Oksana Arnold and Klaus P. Jantke. Therapy plan generation in complex dynamic environments. ICSI Report TR{94{054, International Computer Science Institute, Berkeley, California, October 1994. [AJ94c] Oksana Arnold and Klaus P. Jantke. Therapy plans as hierarchically structured graphs. In Fifth International Workshop on Graph Grammars and their Application to Computer Science, Williamsburg, Virginia, USA, November 1994. [AJ95] Oksana Arnold and Klaus P. Jantke. Anwendung einer Logik der Constraints in der operativen Prozefuhrung. In Peter H. Schmitt, editor, Logik in der Informatik, 3. Jahrestagung der GI-Fachgruppe 0.1.6, pages 13{27. Universitat Karlsruhe, Fakultat fur Informatik, Bericht 23/95, Juni 1995. [Arn92] Oksana Arnold. Reaktive Therapieplanung in dynamischen Prozeumgebungen. WISCON Report 03/92, HTWK Leipzig (FH), Fachbereich IMN, October 1992. [Arn94] Oksana Arnold. A logic of constraints for dynamic process control. WISCON Report 09/94, HTWK Leipzig (FH), Fachbereich IMN, December 1994. [Fir92] R. James Firby. Building symbolic primitives with continuous control routines. In James Hendler, editor, AIPS92, pages 62{69. Morgan Kaufmann, 1992. [Fri93] Gerhard Friedrich. Model-based diagnosis and repair. AICOM, 6(3/4):187{206, 1993. [GL87] Michael P. George and Amy L. Lansky. Reactive reasoning and planning. In Proc. AAAI{87, pages 677{682, 1987. [JA95a] Klaus P. Jantke and Oksana Arnold. Graphgrammatik-Konzepte in der Therapieplanung fur komplexe dynamische Prozesse. In Markus Holzer, editor, 4. GI Theorietag \Automaten und Formale Sprachen", 1994, Proc., Herrsching, pages 42{47. Universitat Tubingen, Wilhelm-Schickard-Institut, 1995. [JA95b] Klaus P. Jantke and Oksana Arnold. Inductive program synthesis for therapy plan generation. Communications of the Algorithmic Learning Group CALG{01/95, Hochschule fur Technik, Wirtschaft und Kultur Leipzig, FB Informatik, Mathematik und Naturwissenschaften, July 1995. [JB81] Klaus P. Jantke and Hans-Rainer Beick. Combining postulates of naturalness in inductive inference. EIK, 17(8/9):465{484, 1981. [MAM92] Volker May, Oksana Arnold, and Uwe Metzner. Wissensverarbeitung in dynamischen Prozeumgebungen { Eine Anforderungsspezi kation. WISCON Report 01/92, HTWK Leipzig (FH), Fachbereich IMN, March 1992. [MJA95] Daniel Matuschek, Klaus P. Jantke, and Oksana Arnold. Generierung von Therapieplanen mit Mitteln der logischen Programmierung. In Peter H. Schmitt, editor, Logik in der Informatik, 3. Jahrestagung der GI-Fachgruppe 0.1.6, pages 75{78. Universitat Karlsruhe, Fakultat fur Informatik, Bericht 23/95, Juni 1995.