From: AAAI Technical Report SS-95-07. Compilation copyright © 1995, AAAI (www.aaai.org). All rights reserved. The Role of Plans and Planning in Task-Related Discourse 1990).In thesecontexts theywillinterleave planning and communication aboutthe plan. An actionrepresentation thatcandescribe incomplete or incorrect nature of plansandtheprocess usedto correct or completethemisessential. R. Michael Young Intelligent SystemsProgram University of Pittsburgh Pittsburgh. PA 15260 myoung+@pitt, edu Previous Work: Generation Enablement and Previous work in action representation ;for task-related discourse (Pollack 1990; Balkanski 1994; DiEugenio 1993a) has focused on describing relationships that Introduction hold between a pair of actions. Specifically, they have Knowledge representation schemesfor the automatic dealt almost exclusively with two such relationships: generation of action-related natural language mustacgeneration andenablement. Informally, enablement is countfor the relationships commonlydescribed in the relation that holds between two actions when one naturally occurring text.Previousworkrepresentactionestablishes conditions needed fortheotheracingactionin task-related discourse (Pollack 1986; tion to execute. Generation is the relationship that DiEugenio 1993b;Balkanski 1994)has useda repreholdsbetween twoactionswhentheactof performing sentationbasedon Goldman’s(Goldman1970)work oneactionis a waltof performing theother- essenin the philosophy of action.Theseapproaches have tially the first action acts as a one-action subplan for beensuccessful in accounting fortextdescribing the performing the second. relationships betweentwosteps,butwhenviewedin Thefollowing definitions areabbreviated versions of thecontext of theplanin whichthosestepsareemthose found in Di Eugenio (DiEugenio 1993b): bedded, theirrepresentation canbe seento lackspeciDefinition 1 (Generation) Actiona directly generficity. Furthermore, itslimited scopecannotaccount atesaction ~ if and only if 1) a is not part of doing ~, fora widerangeof relationships typically expressed in ~) a and ~ are actions performed by the same agent at task-related discourse. the same time, 3) there are a set of generation-enabling conditions C that hold during the performance time of In contrastto the workbasedon Goldman’sapproach, researchers in AI planning haveconcentrated a and J} whenever a occurs and the conditions C hold, I~ also occurs. on the development of planningalgorithms and the Action a indirectly generates action ~ if and onllt if datastructures thatmakethe production of sound a is an element of a partialllt ordered set of actions 8 planscomputationally manageable. Thereis a corthat directllt #enerates1~. respondence betweentheinter-step relationships expressed in utterances andthestructure of plansproDefinition 2 (Enablement) Action a enables acducedbyrecent workin hierarchical andpartial-order, tion ~ if and onllt if1} the time of a is prior to the time causallink(POCL)planning. Thispaperdescribes of ~, ~) there are a set of conditions, C, such. that one work-in-progress thatrelates therepresentational reof the conditions in C, ei, holds as a result of the perquirements of task-related natural language generation formance of a and either there is a third action 7 such to recently developed models of plans. that 7 generates ~ under C; or C are the ezeeutabilitlt conditions on i~. Representational Requirementsfor These definitions have proved particularly useful DiscourseSystems for describing relationships between steps underlying Several key representational issues have been identified means clauses and purpose clauses (Balkanski 1994; in previous work on task-related discourse. First, the DiEugenio 1993b). Means clauses are "by" constructions of the form "Do a by doing if’ and are typically representation language must describe the role an acused to express generation, as in "Travel to Memphis tion willplayina particular task;thatis,howitbears on theotheractions underdiscussion. Thisisessential by taking the train.". Purpose clauses are infinitival "to" constructions of the form "Do a to do/3." Purforexplaining therationale behindtheparticular way an actionis included in thetask.Second, thereprepose clauses can be used to express both generation, as in the clause "take the train to travel to Memphis," sentation language mustdescribe actions andtasksin a hierarchical manner. Thisis necessary forgenerating or to express enablement, as in the clause "remove the theabstract descriptions of actions commonly foundin faceplate to replace the fuse." Unfortunately, Definitions 1 and 2 suffer from two natural language descriptions. major limitations. First, while they are adequate when Finally, actionrepresentations mustbe capable of describing partialplans.Conversations aboutplans considering a pair of actions in isolation, they are not oftenoccurin contexts whereagentsarecollaborat- precise enough when viewing the actions in the coning aboutthe construction of plan(Grosz& Sidner text of the plan in which they occur. For instance, 200 when there are several prior steps a~ that assert an executability condition forsomestep/~,eachc~ enables/~. Furthermore, enablement holdsevenif there areintervening stepsthatundotheasserted precondition.In theformercase,systems generating enablernenttextcannotdetermine whichstepto use when constructing a purpose clause. In thelatercase,those systems mayselecta stepwhoseeffectis undonebeforethecondition is needed, effectively describing an unsoundplan.Balkanski (Balkanski 1994),Di Eugenio(Digugenio 1993b)andDelin,et al (Delinet 1994)encounter whatareessentially thesamedifficultiesduring textinterpretation, inthepost-hoe analysis of instructional textcorpora by humananalysts. Furtherquestions mustbe answered, however, beforeappropriate textual descriptions of actioncanbe generated fromthisrepresentation. Forinstance, what interval musttheconditions C holdoverwhena setof stepsindirectly generate a parentstepfl?How does thetemporal co-occurrence constraint on direct generationapplyto a setof actions in indirect generation? Whattemporal representation is usedto relatesteps, particularly sub-steps thatoccurduringtheexecution of a parentstep? Thesecondlimitation of thesedefinitions is that theydo notaccount fora numberof relationships betweenactions thataredescribed in task-related discourse. Forinstance, as Di Eugenio pointsout(DiEugenio1993b), naturally occurring discourse oftendescribes a relation shecallsa mai~teaa~ce 9oal-that is,a condition thatmustholdovera specified interval. Theserelations correspond closely to theprotection intervals usedin least-commitment planning. Descriptionsof additional relations between plancomponents canbe foundin task-related discourse, including ordering constraints, variable bindings andthedescriptionof planflaws- threats, openconditions andunexpanded abstract steps.Noneof theserelations are expressible usingthedefinitions of generation andenablement givenabove. Theselimitations aredue,in part,to thelackof grounding in a formalrepresentation of action.The following section describes an approach towards action representation expressed in termsofactual planstructures, makingproperdefinition muchmorestraightforward. & Weld 1991; McAllister & Rosenblitt 1991) by incorporating actiondecomposition directly intothecausal linkframework< DPOCL extends the UCPOP (Penberthy & Weld 1991)algorithm by addinga second, hierarchical componentto planconstruction. Thestepsthatareadded to a DPOCLplanaredivided intotwoclasses. Primitivesteps are those actions directly executable by the agent for whomthe plan is produced; composite steps are steps acting as abstract descriptions of the subplans that achieve the composite step’s effects. In addition to the standard POCL-style causal links that connect steps, DPOCLplans contain decompositional links connecting composite steps to the steps that play a role in their subplans. Each subplan is bounded by a null initial step whose effects are the preconditions of the parent and a null final step whose preconditions are the effects of the parent. A DPOCLplan is complete once all threats are resolved, all preconditions are established and all composite steps are expanded. There are several factors that differentiate DPOCL plans from those produced by other hierarchical planners and make them an appropriate choice for a representation for natural language generation. First, DPOCLplans contain the standard POCLplan structure - causal links, codesignation and ordering constraints are all available as components of the representation. As I will describe, these features are useful when dealing with discourse used to communicateanalogous concepts. Second, unlike other hierarchical task network (HTN) planners (Erol, Hendlcr, & Nau 1994; Currie & Tate 1991; Sacerdoti 1977), DPOCLdoes not replace a composite step with its subplan during decomposition. Instead, the composite step remains in the plan, the subplan steps are added and explicitly marked as children by decompositional links. Finally, unlike systems that build hierarchical plans bottomup via plan parsing (Barrett & Weld 1994), DPOCL’s control structure allows plans to be built in a topdown manner. The hierarchical structure of DPOCL plans and the top-down manner in which they are constructed mirrors the top-down approaches to planning often described in discourse. The Role of Plan Structures Discourse in Plan StructuresAs A Representational Base Plan structures provide a language expressive enough to account for a wide range of communication. Generation and enablcment reduce to simple relations be- In orderto addressthe representational limitationsdescribed above,we are currently developing a formalaction-description language(Young1994) whosesemanticsis groundedin plan components. The plan structures we use are thoseproducedby DPOCL(Young,Pollack,& Moore1994),a hierarchicalplanning algorithm thatextends recentworkin partial order,causallink(POCL)planners (Penberthy 1Spacelimitations require that mydiscussion here remaininformal and prevent a full description of the underlying DPOCL plan structures or the specification of the syntax and semantics of our plan description language. For a full description of the DPOCL planner, see (Young,Pollack, &Moore1994). The action description language used to describe DPOCL plan structures is defined in (Young 1994). 201 tween plan components. Twosteps are related by enablement precisely when they are connected by a causal link. Similarly, a step a generates a step/3 precisely 2. when a is connected to/3 via a decomposition link The underlying plan representation for text describing ordering and binding constraints is equally straightforward. Furthermore, the plan partiality exhibited when discussion is interleaved with planning corresponds closely to DPOCL’s(and, indeed, all POCLplanners’) incremental planning algorithm. Utterances describing how to flesh out an incomplete plan can be interpreted in this context as providing necessary direction for the participants’ planning algorithm. These utterances can then be generated by anticipating incorrect or lesspreferred planning operations and composing the specific directives to control the planner’s search. As an example, consider the following situation. Suppose two agents, Lou and Stu, are discussing Stu’s plan for their making dinner together. Lou and Stu both know that Stu is making the main dish and Lou is makingthe dessert, but they haven’t planned things out in any greater detail. Stu now decides to make quiche, a dish that requires, say, six eggs. Knowing this, Stu can determine that if Lou refines his plan for making dessert to one making dessert by making brownies, there will be a conflict over a critical resource, the eggs. There are several ways that Stu can avoid this conflict by directing Lou not to form a conflicting plan. For instance, Stu can spell it all out, as we have just done for you. Or he could say "don’t make brownies because I’m making quiche" or even just "I’m making brownies," counting on Lou’s own plan inference capabilities to detect and avoid the conflict. Another critical aspect of task-related discourse is the ability to describe the intentional relations that hold between actions. In Bratman’s (Bratman 1987) account of intentionality, intention commits an agent to action and acts as a filter on what intentions can subsequently be adopted. Young, et al, (Young, Moore, & Pollack 1994) provides a definition of intended actions and effects in DPOCL plans that~has a close correspondence to these notions Definition 3 (Intention in DPOCLPlans) step s is intended with respect to a plan P precisely when s is a step in P. .4n effect e of step si in plan P is intended precisely when there is g causal link labeled ~oith e connectin# si to another step sj such that either I} sj is the goal step, ~) sj is s final step in a subplsn for step s~ and effect e of parent step sk is intended or 3} sj has an effect eI that is intended. 2Here we ignore the distinction between preconditions and the generation-enabling conditions used in previous work. For a complete discussion of the differences, see (Young1994) 202 Grosz and Kraus (Grosz & Kraus 1993) relate Bratman’s notion of intention to a description of plans held by a group of collaborating agents. They distinguish between intending to do an action and intending that a condition hold in the world. Our definition of intentionality is consistent with theirs. Just as agents are constrained in Bratman’s account by their prior intentions, so agents using the DPOCL planner are constrained during plan construction in the way they can refine a partial plan without violating its soundness. Describing a DPOCL plan’s intentional structure is critical, then, for constraining the ways in which the partial plans of other collaborating agents will be completed. Characterizing Communication as Refinement Utterances that describe how to flesh out an incomplete plan can be generated by anticipating the points in the planning process where another agent’s plan refinement activity is under-constrained. Similarly, these utterances are interpreted as directives to guide the refinement of the commonplan. There are three types of flaws that are found in DPOCLplans and that act as motivation for cooperative plan refinement: ¯ Open Preconditions: Steps in a plan can execute successfully only if all of their preconditions are satisfied immediately before they execute. ¯ Unexpanded abstract steps: Recall that primitive steps are those steps that are actually executable by an agent. Abstract steps are just that - abstractions of the steps that make up their subplan. When a plan contains an abstract step but does not contain a subplan for that step, agents executing the plan will be unable to determine what primitive steps to execute for that abstraction. ¯ Threats to causal links: A causal link in a DPOCLplan is threatened when some other step, either a step in the commonplan or a step in the agent’s private plan 1) asserts the negation of the condition that labels the causal link and 2) may occur during theinterval spanned by thelink. Therearethreetypesof flaw-related refinement operations thatcan be performed on DPOCLplans.Each addresses onetypeof flawdescribed above. I. Causalllnkaddition: Causallinksare addedto a planto indicate thatonestepsl is to be used to establish thepreviously openprecondition of a second steps2. 2. Decompositionllnk addition"Decomposition linksareaddedto a planwhenan abstract stephas no subplan. A decomposition operator for the abstract stepis chosen andthesteps, causal linksand binding andordering constraints specified in thedecomposition operator areaddedto theplan.Decom- position links are then added to connect the abstract step to those steps in its subplan. 3. Threat Resolution Three standard types of refinement operations are available to resolve a threat by some step ss to a causal link sl ~ s2 role in (e.g., "Do a to do 9’-"). But these constraints fail to specify the causal connection between the steps a,/3 and precondition c, the open condition whose establishment provides the motivation for the addition of a in the first place. "Doa to do if’ identifies the intentional connection (the enablement relation between a and/3). In addition, this utterance implicitly describes two additional plan constraints to be incorporated into a commonplan. It describes the type of the new step a and the ordering constraint between a and/3. More complicated utterances, such as "Do a to establish condition c. c must hold before/3 can occur." make additional constraints that underlie a purpose clause explicit. (a) Promotion: When ss can be ordered before sl, an ordering constraint (s3 < Sl) can be added promote ss before sl. (b) Demotion: When ss can be ordered after s~, an ordering constraint (s2 < s3) can be added demote ss after s2. can be (c) Separation: When binding constraints placed on the variables in the effects of Sl or s3 so that any conflict between the two steps is avoided, such a binding constraint can be added to separate the offending step. Each utterance in the discourse serves to introduce a set of newconstraints (e.g., newsteps, causal links and decomposition or ordering constraints) and the process repeats until the plan is sufficiently constrained. As I describe below, each type of constraint can be expressed using different clausal constructs; furthermore, each type of constraint requires different types and amounts of surrounding information to ensure proper inclusion in the mutual plan. New Causal Links and Steps Whena partial commonplan has a step /3 with an unsatisfied precondition c, a causal link must be added to establish the needed condition. A causal link may be created so that it originates from a step already in the plan or so that it originates from a new step created at the same time and specifically added to the plan to act as a source for the causal link. In the former case, purpose clauses can be used to describe step overloading (Pollack 1992). That is, they can be used to indicate that a step already in the plan participates in more than one intentional relationship. "Do a to do/3" indicates that, in addition to the role that a already plays in a plan, a now contributes a condition needed by/3. In the later case, a new step a must be added to the plan as a source for a new link a ~/3. The plan can be constrained to include a by generating an utterance such as "Do a," but the intended interpretation of this utterance, namely that a is to be used as a source for a particular causal link, is made difficult by the utteranee’s ambiguity, a may contribute conditions that could be used to establish a precondition of several steps already in the plan. To avoid this ambiguity, additional constraints relating a to the plan as a whole can be described in the utterance’s surrounding clauses. Ordering constraints relating a to steps it must follow or precede can be mentioned, or decompositional constraints can be described that indicate which subplan, if any, a plays a 203 Decompositions An unexpanded abstract step/3 may be decomposed in any of several ways, each corresponding to the use of a different decomposition operator for ffs act-type. A particular decomposition can be identified by referring to the steps that play a role in the generation relationship relating parent to steps in its subplan. The means clause "Do a by doing if’ identifies this type of decomposition. Whena set of steps S generates/3, describing the decomposition by using a means clause that mentions each s in S makes for an awkward construction. Instead, often a single, salient step is referred to in a means clause. One can say "take the train to visit your sister" whentaking the train is only one of a series of steps in the subplan for visiting your sister. What makes taking the train "salient" when describing a plan to visit your sister? Several factors in the DPOCLsubplan could be exploited to determine this type of salience. For instance, taking the train could be the one step that distinguishes the decomposition operator it appears in from the other applicable decompositions. This could be because the operator in which it appears is the only decomposition operator that contains a take-train step. Or it could be that all other decompositions involve means of travel that introduce flaws into the plan (for instance, buying an airline ticket would leave you with too little money, walking to your sister’s wouldleave you with too little time, etc) and train travel does not introduce any such flaws. Threat Resolution Whena mutual plan that is partial has several steps that are unordered with respect to one another, constraints can be added to order the two components. Ordering constraints between two steps s~ and sj arise in DPOCLplans for one of three reasons. First, s~ might be constrained to occur before sj because a causal link connects si to sj. Second, s~ might be constrained to occur before sj because a decomposition operator encodes a user-defined preference. Finally, s~ might be required to precede sj due to the resolution of a threat (see below). If s~ asserts some condition thatthreatens a causal linkoutof sj,orif sjthreatensa linkintosi,theirordering maybeconstrained to avoidtheconflict. An utterance suchas "Doa beforeif’canbe usedto describe newordering constraints. As described above, theseordering constraints arealsoexpressed implicitly in purpose clauses describing enablement. usedto suggest avoiding thethreat, as described in the previous example with Stu and Lou. As with purpose clauses, additional information can be includedwitha negative imperative to makethe intentional connection clear."Donotdo ~ before~," "Do not do c~ to do/~,"or "Do not do ~ between7 andif’allprovide someinformation aboutthenature ofthethreat thata creates. Explanatory Clauses In thisviewof task-related utterances, explanatory clausesareusedto makethe motivation behindrefinements clear.Explanatory clausesaresubordinate clauses thatprovide information abouttheplancontextof a mainclause describing someplanrefinement. Explanatory clauses typically beginwithmarkers such as because or since.Theseclauses playat leastfour roles of intaskrelated discourse. Future Work Usinga hierarchical planstructure as an actiondescription language eliminates theambiguity inherent in previous approaches andextends therepresentational capability of ourlanguage to account for thoseplan constructs commonly foundin task-related discourse. Ourcurrent workdefines a formalfirst-order language whosetermsdenoteplanconstructs and whoserelationsexpressgeneration, enablement andotherconceptsmadeexplicit in task-related conversation. Often, however, peoplechooseto leaveimplicit importantrelations betweenthe stepsin plans.They relyinstead on theability of theirhearer topiecetogether theunderlying plans.Forinstance, theychoose to describe actions at higher orlowerlevels of abstraction.In addition, theyinclude moreorlessdetail about theobjects, temporal orderings or particular stepsthat playa rolein a subplan. And theychoosetheextent to whichtheymakeexplicit the tiebetweenthenew plancomponents andthelargerplanalready underdiscussion. Wheninterpreting theseutterances, hearers takeintoaccount theunspoken relationships between theplancomponents described in a discourse andthe structure of the planalreadycommunicated. Speakers,then,anticipate thisinferential capacity in order to generate moreeffective communication. TheworkthatI proposewillprovidea formalaccountof this"anticipation" in thegeneration of taskrelateddiscourse. We willextendouractionrepresentation to includea modelof thementalprocesses undertaken by thehearerwheninterpreting theseambiguousor incomplete taskdescriptions. Ourgoalis to construct a system thattakesintoaccount theplanreasoning capabilities (bothplanconstruction andplan recognition) of thehearerin orderto generate more natural descriptions of plan. ¯ Explanatory clauses canbe usedto describe relevant causalstructure of theunderlying plan.Thiscategorycoversutterances likethe meansclausesand purpose clauses described earlier. Forinstance, the italicized testintheutterance "takethetraintoget to Boston." explains thecausalconnection between thetwostepsmentioned. ¯ Explanatory clausescandescribe thespecific flaw thattherefinement proposed in themainclauseaddresses: - "Mopthefloorlast,sinceyoucan’twalkon the floor until itdries." "Don’t use bleachon the jeans,becausebleach damages colored clothes." - "Callthe tow trucknow becausewe want the bridge to be clearbefore rushhour." ¯ Explanatory clausesmay describe how alternative refinements fortheflawunderconsideration could introduce additional flawsor failto refine theflaw at hand.Forinstance, " Taketheplaneto Boston, because taking thetrainwillgetyouintoolatethat night." ¯ Explanatory clausesmay describe preferences betweencompeting refinements for thecurrentflaw. Forinstance, "Paintthebarnbeforeyoupaintthe flowers. It’seasier tofillinthelargeareas andthen go backandworkon thedetails." Avoiding Threats - Negative Imperatives Becausethe intentional structure of a plan must be preserved during the planning process, refinements that create un-resolvable threats must be avoided. As Di Eugenio describes, negative imperatives, constructs of the form "Do not do c~," express directives to avoid conflict (DiEugenio 1993b). Whena generation system detects that an agent may form a flawed plan with a threatened causallink,a negative imperative canbe 204 References Balkanski, C. 1994. Actions, Beliefs and Intentions in Multi-Action Utterances. Ph.D. Dissertation, Department of Computer Science, Harvard University. Barrett, A., and Weld, D. 1994. Task decomposition via plan parsing. In Proceedings of the National Conference on Artificial Intelligence, 1117 - 1122. Menlo Park, CA: AmericanAssociation of Artificial Intelligence. Bratman, M. 1987. Intentions, Plans, and Practical Reason. Cambridge, MA:Harvard University Press. Currie, K., and Tate, A. 1991. O-Plan: The open planning architecture. Artificial Intelligence 52:4986. Delin, J.; Hartley, A.; Paris, C.; Scott, D.; and Vander Linden, K. 1994. Expressing procedural relationships in multilingual instructions. In Proceedings of the Seventh International Workshop on Natural Language Generation, 61-70. Dieugenio, B. 1993a. Action representation for interpreting purpose clauses in natural language instructions. In Proceedings of the Fourth International Conference on Knowledge Representation and Reasoning. Dieugenio, B. 1993b. Understanding Natural Language Instructions: A computational approach to purpose clauses. Ph.D. Dissertation, Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA. Erol, K.; Hendler, J.; and Nau, D. 1994. UMCP:A sound and complete procedure for hierarchical tasknetwork planning. In Proceedings of the Second International Conference on AI and Planning Systems, 249-254. Goldman, A. I. 1970. A Theory of Human Action. EnglewoodCliffs, N.J.: Prentice-Hall. Grosz, B., and Kraus, S. 1993. Collaborative plans for group activities. In Proceedings of the International Joint Conference on Artificial Intelligence, 367-373. Young, R. M.; Pollack, M. E.; and Moore, J. D. 1994. Decomposition and causality in partial order planning. In Proceedings of the Second International Conference on AI and Planning Systems, 188-193. Young, R. M. 1994. Representing plans for taskrelated discourse. Technical Report in preparation, Intelligent Systems Program, University of Pittsburgh. Grosz, B., and Sidner, C. 1990. Plans for discourse. In Cohen, P.; Morgan, J.; and Pollack, M., eds., Intentions in Communication. Cambridge, MA: MIT Press. 417 - 444. McAllister, D., and Rosenblitt, D. 1991. Systematic nonlinear planning. In Proceedings of the National Conference on Artificial Intelligence, 634-639. Penberthy, :I. S., and Weld, D. 1991. UCPOP:A sound, complete partial order planner for ADL.In Proceedings of the Third International Conference on Knowledge Representation and Reasoning. Pollack, M. 1986. Inferring Domain Plans in Question-Answering. Ph.D. Dissertation, Department of Computer and Information Science, University of Pennsylvania. Pollack, M. 1990. Plans as complex mental attitudes. In Cohen, P.; Morgan, J.; and Pollack, M., eds., Intention in Communication. MIT Press. Pollack, M. E. 1992. The uses of plans. Artificial Intelligence 57:43-68. Sacerdoti, E. D. 1977. A Structure for Plans and Behavior. Artificial Intelligence Series. NewYork, New York: Elsevier North-Holland, Inc. Young, R. M.; Moore, J. D.; and Pollack, M. E. 1994. Towards a principled representation for discourse plans. In Proceedings of the Sizteenth Annual Conference of the Cognitive Science Society, 946-951. 205