• No results found

Plan Recognition as Candidate Space Search

N/A
N/A
Protected

Academic year: 2020

Share "Plan Recognition as Candidate Space Search"

Copied!
57
0
0

Loading.... (view fulltext now)

Full text

(1)

ABSTRACT

K U M AR AN , V IK R AM . Plan R ecog nition as C andidate S pace S ear ch . (U nder th e dir ection of M ich ael Y oung ).

(2)

P L AN RECO G N I TI O N AS CAN D I D ATE SP ACE SEARCH

by

V I K RAM K U M ARAN

A th esis subm itted to th e Gr aduate Faculty of N or th C ar olina S tate U niver sity

in par tial fulfillm ent of th e r eq uir em ents for th e D eg r ee of

M aster of S cience

CO M P U TER SCI EN CE

R aleig h 20 0 6

AP P RO V ED BY :

D r . R . M ich ael Y oung

(3)

BI O G RAP H Y

V ik r am K um ar an spent h is ear ly life in C h ennai India. After com pleting h is under g r aduate deg r ee in C h em ical Eng ineer ing fr om th e Indian Institute of Tech nolog y, C h ennai, h e left tr opical India for th e land of snow, R och ester , N ew Y or k to pur sue h is g r aduate studies. He tr ained to be a C h em ical Eng ineer and com pleted h is M S in th at field fr om th e U niver sity of R och ester . He m et h is wife th er e and followed h er to N or th C ar olina. Having spent m any year s ex plor ing com putational m odels in C h em ical Eng ineer ing , h e decided to pur sue, softwar e eng ineer ing as h is car eer path .

After stepping away fr om academ ics for a few year s, h e r ealiz ed th at applied com puter science in th e ar ea of infor m ation tech nolog y did not satisfy h is cur iosity for th e subj ect. To satisfy h is year ning for som eth ing m or e h e decided to pur sue an academ ic deg r ee in com puter science. He j oined th e m aster s pr og r am in th e depar tm ent of com puter science, N or th C ar olina S tate U niver sity.

(4)

TABL E O F CO N TEN TS

LIS T OF TABLES ... iv

LIS T OF FIGU R ES ... v

1 IN TR OD U C TION ... 1

2 PLAN R EC OGN ITION AS C AN D ID ATE S PAC E S EAR C H ... 4

2.1 M otivation ... 4

2.2 M odels of Plan R ecog nition ... 6

3 C OM PU TATION AL M OD EL OF PLAN R EC OGN ITION ... 17

3.1 D efinitions ... 17

3.2 Assum ptions ... 19

3.3 Alg or ith m ... 20

3.4 Asser tions ... 24

3.5 Analysis ... 27

3.6 Im plem entation... 28

4 EX AM PLES ... 30

4.1 C ook ing D om ain... 30

4.2 V acation D om ain... 33

5 AN ALY IS OF THE R EC OGN IZ ER ... 41

5.1 C om par ison with Peer s... 41

5.2 Applications of th e R ecog niz er ... 43

6 C ON C LU S ION ... 46

(5)

L I ST O F TABL ES

(6)

L I ST O F F I G U RES

Fig ur e 1.1 : S ch em atic R epr esentation of Plan R ecog nition system s... 2

Fig ur e 2.1 : S am ple Event Hier ar ch y K autz [1987] ... 11

Fig ur e 4.1: Th e C ook ing D om ain Actions... 30

Fig ur e 4.2: Th e C ook ing D om ain Plan Libr ar y... 31

Fig ur e 4.3: Th e Planning Gr aph ... 31

Fig ur e 4.4: Th e V acation D om ain Actions... 35

Fig ur e 4.5: Th e V acation D om ain Plan Libr ar y ... 36

Fig ur e 4.6: Th e V acation D om ain Planning Gr aph A ... 37

Fig ur e 4.7: Th e V acation D om ain Planning Gr aph B... 39

(7)

1

I N TRO D U CTI O N

Intellig ence is to not j ust r eaction to stim uli but th e ability to th ink ah ead and decide on a ser ies of steps and conting encies to r each a desir ed g oal. Th is view of intellig ence m ig h t ex plain wh y “ planning ” h as been an active ar ea of r esear ch in AI for m any year s. S im ilar to th is ar g um ent for intellig ence one can also ar g ue th at m eaning ful inter action between intellig ent being s occur s wh en th ey ar e able to discer n th e plans of one anoth er . Hum an conver sation would g et ver y tedious if people h ad to ex plain ever y action and descr ibe all th eir g oals and intentions. Hum an com m unication r elies on th e com m unication of m inim al but sufficient infor m ation enoug h to deter m ine th e intentions with out th e need for step by step ex planations. For ex am ple, if you see a per son g etting down fr om a tax i, with lug g ag e at an air por t it is usually safe to assum e th at th ey ar e g oing to a air line counter , ch eck -in, pass secur ity, boar d a plan and fly som ewh er e, even th oug h you did not see all th ose steps being per for m ed. Th is pr ocess of deter m ining an ag ent’s plan and g oals can be classified as plan recognition.

Plan r ecog nition is an im por tant aspect of AI and h as m any differ ent ar eas of application, nam ely, natur al lang uag e under standing , h um an com puter inter action, m edical diag nosis, user m odeling , tutor ing system s, stor y r ecog nition, inter active g am es and intr usion detection.

(8)

At th e h ig h est level alm ost all r ecog nition system s can be sch em atically r epr esented using a sm all set of clear ly identified r oles, as sh ow in th e Fig ur e 1.1. R ecog nition star ts with a libr ar y of possible plans th at an ag ent would be ex pected to ex ecute in a g iven dom ain. Th e obser ving ag ent th en tr ack s one or m or e actions per for m ed by th e obser ved ag ent. Th e obser ver th en r uns its plan r ecog nition alg or ith m (r ecog niz er ). Based on th e obser ved actions, som e dom ain dependent h eur istics and plan libr ar y th e r ecog niz er pr edicts one or m or e intended g oals and plans of th e obser ved ag ent [C ar ber r y, 20 0 1]. U sually th e plan libr ar y and h eur istics is dom ain dependent wh ile th e r ecog niz er itself is dom ain independent.

Figure 1.1 : S c h em at ic R ep res en t at io n o f P l an R ec o gn it io n s y s t em s

R esear ch in plan r ecog nition h as focused on im pr oving each of th e differ ent aspects descr ibed in th e Fig ur e 1.1. R esear ch done by K autz [1987] was pr im ar ily focused on str eng th ening th e r easoning aspects of plan r ecog nition. He developed a r easoning fr am ewor k based on cir cum scr iption to deter m ine a m inim al set of ag ent’s intended g oals/ plans th at ex plained th e obser ved actions g iven a com pletely specified h ier ar ch ical descr iption of all possible plans in th e dom ain. His wor k is usually r ecog niz ed as th e fir st

Observer A g ent

P l a n L i bra ry

A c t i o n 1 A c t i o n 2

A c t i o n 3 A c t i o n 4 R ea so ni ng

E ng i ne

H eu ri st i c s

R ec o g ni z ed P l a n

(9)

attem pt at for m aliz ing plan r ecog nition. His for m al th eor y of plan r ecog nition h as been th e basis for subseq uent plan r ecog nition r esear ch [V ilain, 1990 ; Alex ander sson, 1995; Wobck e, 20 0 2]. Wh ile h aving a sound and efficient r easoning alg or ith m is essential for successful r ecog nition, in r ealistic pr oblem s, th e ch alleng e is usually th e dom ain siz e and ability to define plan libr ar ies. In m ost r eal life dom ains plan libr ar ies ar e ver y lar g e and it is alm ost im possible to cr eate th em m anually. R esear ch er s h ave developed case based plan r ecog nition system s th at lear n novel plans by obser vation. Th is lear ning alg or ith m builds and evolves th e plan libr ar y over tim e [K er k ez et al., 20 0 1]. Given a m assive plan libr ar y, r ecog nition alg or ith m s need to efficiently access plans fr om th e libr ar y to per for m effectively in r eal tim e situations. S om e r esear ch er s h ave tr ied to desig n m or e efficient data str uctur es using th eir ex per tise in k nowledg e r epr esentation [Weida, 1995]. A sound, com plete, and efficient r easoning alg or ith m or a well-defined and easily accessible plan libr ar y, ar e not sufficient to build a per fect plan r ecog nition system . One of th e big g est stum bling block s in r ecog nition is ch oosing between m ultiple, eq ually possible plans. M ost system s use som e k ind of h eur istic to ar r ive at a sing le plan. Th e h eur istics m ig h t eith er be dom ain dependent or user dependent. S om e r ecog niz er s ch oose to deem ph asiz e th e im por tance of for m al th eor y and em ph asiz e h eur istics based on r ules of th um b [Allen et al., 1980 ; Allen, 1983]. Anoth er solution to th is pr oblem is th e use of pr obabilistic appr oach es lik e Bayesian networ k s and D em pster -S h afer th eor y [Albr ech t et al., 1998; C h ar niak et al., 1993].

(10)

2

P L AN RECO G N I TI O N AS CAN D I D ATE SP ACE SEARCH

2.1

M o t i v a t i o n

Th er e ar e m any aspects to th e pr oblem of plan r ecog nition. One issue inh er ent in m any plan r ecog nition contex ts is m ultiple eq ually possible solutions. Wh en th er e ar e m ultiple ex planations for a set of obser ved actions th e only m eans of disam big uating between th ese ch oices is th e use of dom ain specific k nowledg e. An advantag e of r ecog niz er s th at r ely on h eur istics or uncer tain r easoning lies in th eir ability to tack le th e am big uity th at is inh er ent in plan r ecog nition. Heur istics ar e useful in ch oosing between plan sets th at ar e deem ed as eq ually valid by for m al analysis. However , using th em as th e sole m eans to ch oose between all possible plans would not be as effective. Th is conclusion is based on th e fact th at h eur istics r eq uir es ex tensive dom ain k nowledg e th at m ig h t not be always available. Th is leads us to believe th at for m al m eth ods h ave a sig nificant r ole to play in identifying th e candidate plan-sets. We h ave tr ied to develop a fr am ewor k th at does not ex clude th e use of abductive r easoning and dom ain specific h eur istics to ex plain obser vations; th ese tech niq ues can easily be used to aid our alg or ith m with a r esulting h ybr id system th at m ay be str ong er th an its par ts.

In our r esear ch we would lik e to tack le th e following two q uestions

C an w e l ev erage o ur un ders t an din g o f p l an n in g al go rit h m s t o dev is e an ef f ic ien t p l an rec o gn iz er?

(11)

oth er attem pts endeavor to solve th e pr oblem by devising optim al ways of r epr esenting and building plan libr ar ies, with th e focus on access speed and siz e. [Lesh , 1998; K er k ez et al., 20 0 1] Th ese appr oach es can coex ist with our appr oach as th ese tech niq ues only affects wh at th e plan libr ar y contains and h ow it is built and not h ow th e plan libr ar y is used.

Over th e past few year s one of th e fastest planner s for solving classical planning pr oblem s h as been GR APHPLAN , [Blum et al., 1997] cr eated by Blum and Fur st. K am bh am pati [1997] in h is analysis of GR APHPLAN , consider s GR APHPLAN to be a m em ber of th e g r oup of for war d state-space planner s. One of th e m ain pr oblem s for planner s th at h ave to do for war d state space sear ch is th at th e sear ch tr ee can g r ow lar g e even for sm all pr oblem siz es. Accor ding to K am bh am pati th e secr et beh ind g r aph plan is th at it uses m utex r elations th at block th e pr opag ation of illeg al subsets of pr opositions as th e sear ch g r aph is built. K am bh am pati speculates th at, calculating and using 2-siz ed m utex r elationsh ip r educes th e sear ch space sig nificantly, because it is not com putationally ex pensive (O(n2)) and action–action inter action is usually pair wise.

Our plan r ecog nition alg or ith m tak es a sim ilar appr oach . We attem pt plan r ecog nition by sear ch ing th r oug h candidate plan space. We believe th at if you define and pr opag ate m utex r elationsh ips as we ex pand th e plan space we can br ing about th e sam e efficiency to plan r ecog nition th at g r aph plan br oug h t to planning .

H o w t o dev el o p a p l an rec o gn it io n al go rit h m t h at is ef f ec t iv e in p redic t in g t h e im m ediat e f ut ure al o n g w it h t h e o v eral l in t en t io n o f t h e agen t s ?

(12)

user is tr ying to r each th at g oal and r espond accor ding ly. In such situations we still need to r ecog niz e g lobal intentions, but to r eact to local contex t of th e inter action we need to be able to pr edict th e nex t action. We feel th at our system th at builds th e sear ch g r aph incr em entally as each action is obser ved, and k eeps tr ack of possible plans after each action, will be able to per for m well at both local and g lobal r ecog nition.

2.2

M o d e l s o f P l a n Re c o g n i t i o n

Th e pr oblem of plan r ecog nition h as been appr oach ed fr om m any dir ections. Our str ateg y is focused on enh ancing r easoning r ath er th an efficient k nowledg e r epr esentation. R easoning eng ines ar e g ood at efficiently pr uning ir r elevant plans fr om th e plan libr ar y and r etur ning a sm all set of plans th at m atch es th e obser ved actions. R esear ch er s h ave m ade differ ent ch oices on h ow th ey ch oose th e best candidates fr om th e available set of plans. One popular ch oice m ade by ear ly plan r ecog nition system s, was th e use of com m on sense r ules or h eur istics to ch oose th e cor r ect plan in th e libr ar y [Allen et al., 1980 ; Allen, 1983]. Th is appr oach is ver y successful, especially wh en dealing with sm all dom ains. As th e ar ea of r esear ch developed, for m al m eth ods wer e em ployed to deter m ine th e m inim al set of plans th at ex plains obser vations [K autz , 1987; V ilain, 1990 ; Lesh , 1998]. C ur r ently th er e is lot of wor k being done to identify ag ent plans based on pr obability [Albr ech t et al., 1998; C h ar niak et al., 1993; Bauer , 1994]. In th is section we will discuss im por tant developm ents in th ese th r ee ar eas of r esear ch . In subseq uent sections we will ex plain our appr oach and com par e it with th e system s pr esented in th is section.

2.2.1 H euris t ic s R ec o gn it io n S y s t em s

(13)

subj ects for m ed a sm all set of h ypoth esis to ex plain th e actions and with each new action th e h ypoth esis was eith er str eng th ened or r ej ected. Th e set of h ypoth esis was always sm all and subj ects tended to for m th e h ypoth esis in a h ier ar ch ical m anner for m ing m or e abstr act h ypoth esis initially at fir st and filling in th e details as m or e evidence was obser ved. S ubj ects wer e also m or e toler ant with h ypoth esis th at did not ex actly fit all obser ved actions, tending to ex plain away th e offending actions.

Based on th eir ex per im ental data S ch m idt et al. developed a system called th e BELIEV ER . S ch m idt’s system inter nally divided plan r ecog nition into two par ts one was k nowledg e and th e oth er pr ocess. K nowledg e was r epr esented as th r ee dom ains, th e wor ld, th e per son, and th e plan dom ains. Wor ld dom ain r epr esented facts about th e wor ld, per son dom ain infor m ation r eg ar ding th e ag ent’s belief, lik es etc. and th e plan dom ain infor m ation about plan str uctur es and action r elationsh ips. Th is division into th r ee was based on psych olog ical m odels of h um an cog nitive pr ocess. Th e plan r ecog nition was done using a plan g ener ator and plan cr itic. Th e plan g ener ator was used to cr eate plausible plans based pr im ar ily on th e per son m odel and th e plan cr itic was used to weed out incor r ect or im pr obable h ypoth esis.

Th e plan g ener ator and plan cr itic wor k ed on a h ypoth esis about th e ag ent’s g oals called th e ex pectation str uctur e to g ener ate th e appr opr iate plans. Th e system th en tr ies to m atch obser ved actions on to acts in th e ex pectation str uctur e. Th e auth or s do not clear ly ex plain h ow th e initial h ypoth esis r eg ar ding th e ag ent’s g oals is m ade. Th is system also does not suppor t inter leaving plans. Th e m ain contr ibution fr om S ch im dt et al. is not th eir r ecog niz er but th e ex per im ents th ey did to sh ow h ow h um ans use plan r ecog nition as par t of th e com m unication pr ocess.

(14)

way to th e point wh er e it could conclude about user plans. Th e h eur istics wer e sim ple r ules for ex am ple, if a per son wants P, and P is a pr econdition of action A, th en th e per son m ay want to per for m A; or if a per son wants to k now if P is tr ue, th ey m ay want P to be tr ue (or false). Th is appr oach is not scalable to lar g e dom ains as enum er ating all th e r ules would becom e cum ber som e. Also, th e r ecog niz er could only h andle sing le utter ances.

C ar ber r y [1987; 1990 ] developed a system th at would r ecog niz e m ultiple utter ances. C ar ber r y used a h ier ar ch ical str uctur e called th e contex t m odel. Th e contex t m odel r epr esented th e system s beliefs about th e speak er s intended plan and was built based on a dialog ue in pr og r ess between th e system and th e speak er . Th e system did local analysis and based on som e focusing h eur istics ch ose a subplan th at th e user is m ost lik ely pur suing based on th e cur r ent contex t. Th is subplan is th en appended to th e contex t m odel and th e contex t m odel is ex panded. Th e system th en per for m s a g lobal analysis to deter m ine any h ig h er -level plans th at need to be included as a r esult of th e cur r ent subplan being pur sued. Th e contex t m odel is th en ex panded to include th em . Each node in th e contex t m odel is a g oal th at th e infor m ation seek er is attem pting to r each with an identified plan. Based on th e contex t m odel th e system is able to under stand th e dialog ue at m ultiple levels and h ence com m unicate effectively with th e speak er .

Pollack [1990 ] cr iticiz ed ear lier plan r ecog nition attem pts for concentr ating on specific r ecipes of action instead of th e com plex m ental attitudes th at r epr esents a plan in an actor s m ind. Th e ar g um ent was th at, by dealing with plan r ecog nition at a h ig h er level of abstr action fr om specific plans in th e plan libr ar y it is possible to better ser ve/ r espond to th e intention of th e ag ent and develop a m or e r obust r ecog niz er and not g et m isled by incor r ectly constr ucted plans, novel plans etc.

(15)

th ese system s to eng ag e in sh or tcuts, in ter m s of h eur istic infer ence r ules, to nar r ow th e sear ch space. Th ese infer ence r ules h owever ar e not per fect and sacr ifice soundness and com pleteness to ach ieve speed. For ex am ple, in Allen’s system [1980 ; 1983] one of th e infer ence r ules is th at if an ag ent is ch eck ing about th e validity of a statem ent P th en h e would lik e P to be tr ue. Th is h owever will fail in th e case wh en an ag ent is j ust ch eck ing th e tr uth fulness of P because h e is concer ned th at P m ig h t becom e tr ue. Th e differ ence can clear ly be seen between th e following two q uestions. a) Has th e tr ain left yet? b) Was th er e an accident? One advantag e of th ese system s is th e em ph asis on r ecog niz ing th e over all intention of th e ag ent. Th is lets th ese system s wor k at a m or e abstr act level and h ence a sm aller sear ch space. Intention or g oal r ecog nition com par ed to plan r ecog nition m ig h t be a g ood tar g et for natur al lang uag e dialog ue system s but m ig h t not be useful in oth er situations. For ex am ple in a tutor ing situation, local r ecog nition is im por tant as steps ar e as im por tant if not m or e com par ed to over all intention or g oal of th e student. Also all system s m ig h t not h ave th e lux ur y of clar ification dialog ues, intr usion detection system s being a g ood ex am ple.

2.2.2 Fo rm al R ec o gn it io n M et h o ds

Initial attem pts at plan r ecog nition tended to r ely on h eur istics and dom ain dependent infer ence r ules to nar r ow th e sear ch space. K autz [1987] m ade sig nificant pr og r ess for m aliz ing th e pr ocess of plan r ecog nition. K autz ’s com plaint about ear lier attem pts at plan r ecog nition was th eir basis on unsound r ules of infer ence. Th e unsound infer ence r ules wer e cr eated by r ever sing nor m ally sound im plications. If a par ticular plan entails an action it is unsound to assum e th at th e action “ m ay” im ply th e plan [Allen et al., 1980 ]. K autz also ar g ues th at th e decision about wh ich r ules to apply and wh en to stop applying th em was not based on for m al th eor y. In contr ast K atuz ’s fr am ewor k decides on th e ag ent’s plans solely on th e obser vations, r ecog niz er ’s k nowledg e and a lim ited set of ex plicit “ closed wor ld” assum ptions. K autz ’s publication h as pr ovided th e foundation for new th eor ies on plan r ecog nition [Wobck e, 20 0 2; V ilain, 1990 ].

(16)

decom position link . For ex am ple an event “ Boil Fettuccini” is a specializ ation of a “ Boil Pasta” event, and th e event “ M ak e Fettuccini Alfr edo” is com posed of sever al events including “ Boil Fettuccini” and “ M ak e Alfr edo S auce”. Th e event h ier ar ch y also defines a special type of event called th e “ End” event. Th ese “ End” events ar e not com ponents of any oth er event. Th e wh ole g oal of plan r ecog nition is to identify th ese “ End” events th at would g ener ate th e set of obser ved events. K autz ’s fr am ewor k is lim ited to r ecog niz e only plans in th e event h ier ar ch y. K autz ’s system r ecog niz es ster eotypical action r ath er th an uniq ue or idiosyncr atic beh avior . K autz ar g ues th at abandoning th e assum ption th at th e system h as a com plete set of plans would m ak e th e siz e of th e pr oblem too big as th e num ber of possible plans becom es infinite and it would be alm ost im possible to g et to th e solution in r easonable tim e. An ex am ple of K autz ’s event h ier ar ch y is g iven in fig ur e 3.1. Building on h is assum ption th at th e event h ier ar ch y encodes th e com plete k nowledg e available to th e ag ent, K autz m ak es a set of assum ptions th at for m th e basis for h is for m al plan r ecog nition th eor y.

• E x h aus t iv en es s A s s um p t io n : Based on th e assum ption th at th e event h ier ar ch y is com plete K autz assum es th at th e ways of specializ ation as r epr esented in th e event h ier ar ch y ar e th e only k nown ways of specializ ations. For ex am ple if a cook can m ak e th r ee types of “ M ak e S auce”, nam ely “ M ak e Alfr edo S auce”, “ M ak e Pesto S auce” and “ M ak e M ar inar a S auce” and we k now th at th e cook is not m ak ing Pesto or Alfr edo we can conclude th at th e cook is m ak ing M ar inar a.

• D is j o in t n es s A s s um p t io n : Th e assum ption is th at two events ar e disj oint and cannot both coex ist, if th ey neith er abstr act one anoth er nor abstr act a com m on type. For ex am ple in a h ier ar ch y let us say th er e ar e two events “ Eat in R estaur ant” and “ C ook Pasta”. Th ese two events would be disj oint as th ey do not abstr act one anoth er or abstr act a com m on type.

(17)

• M in im um C ardin al it y A s s um p t io n s : All th e assum ptions listed above ar e applicable for all events in th e event h ier ar ch y and th ese assum ptions ar e independent of obser vations. Th ey m ainly descr ibe th e r elationsh ip between events in th e h ier ar ch y. Th e M inim al C ar dinality Assum ptions com bines th e infor m ation fr om sever al obser vations and th e event h ier ar ch y. Given a set of obser vations, using th e th r ee assum ptions descr ibed above it is possible to ar r ive at a set of “ End” events th at would ex plain th e obser vations. Th is assum ption states th at th e r ecog niz er only needs to consider a m inim um set of “ End” events th at ex plains th e obser vations.

Figure 2.1 : S am p l e E v en t H ierarc h y K aut z [19 87]

It can be seen th at th ese assum ptions ar e intuitively r easonable and can be tak en as is, but K autz g oes one step fur th er and uses cir cum scr iption to develop a m odel th eor y for h is plan r ecog nition fr am ewor k . He descr ibes th e fir st th r ee assum ptions above as par ticular cir cum scr iptions of th e event h ier ar ch y. He uses th e m inim um car dinality assum ption to nar r ow th e set of m odels g ener ated by cir cum scr iption.

(18)

obser vations ar e fr om distinct “ End” events. M ultiple sim ultaneous “ End” events ar e obtained by g r ouping obser vations in all possible com binations

Th e plan r ecog nition fr am ewor k developed by K autz is built using th e ex pr essive power of fir st or der log ic. Th e fr am ewor k allows for m ultiple plans and does not put any ar bitr ar y constr aints on th e or der ing or tem por al r elations between steps. One aspect of th is th eor y is th e em ph asis on “ End” events to th e detr im ent of local contex t. It is not str aig h tfor war d to deter m ine h ow th e “ End” event affects local events in r eal tim e incr em ental r ecog nition. Th e plan r ecog nition fr am ewor k is sim ilar to m any plan r ecog nition system s th at cam e befor e and also som e th at cam e after [V ilain, 1990 ; Allen et al., 1980 ; Allen, 1983; Lesh , 1998] in being unable to r ecog niz e er r oneous plans. Er r oneous plans usually occur wh en th e ag ent m ak es planning er r or s by possibly per for m ing ir r elevant actions or by ch ang ing th eir m ind in th e m iddle of a plan. One of th e m ain assum ptions of th is fr am ewor k is th at th e event h ier ar ch y available to th e r ecog niz er is a com plete r epr esentation of all plans in th e dom ain. It is not always possible to g ener ate a com plete event h ier ar ch y in r ealistic system s due to th e num ber of possible plans, wh ich tends to infinity, especially wh en you include er r oneous plans. Th e wor st case tim e for r ecog nition of end events in lar g e dom ains is ex ponential in th e siz e of th e k nowledg e base. Th e ver y conser vative natur e of its r ecog nition alg or ith m h as been r aised as a concer n by Lesh and oth er s [Lesh , 1998; Blaylock , 20 0 2]. If th er e ar e m ultiple possible “ End” events th at ex plain th e set of obser vations th is fr am ewor k lists all of th ese “ End” events as possibilities and does not pr efer one over th e oth er . It does not ch oose based on user pr efer ences and beliefs, lik e h eur istic r ecog niz er s [Allen et al., 1980 ; Allen, 1983] or pr obability based r ecog niz er s [C h ar niak et al., 1993; Bauer , 1994]. On th e oth er h and th is r ecog niz er never m ak es a wr ong g uess, g iven a com plete event h ier ar ch y.

(19)

wh ich lim ited its applicability lik e disallowing inter leaved plans [V ilain, 1990 ]. Wobck e tr ied to adapt ideas fr om belief r evision and conditional log ic to im pr ove th e th eor y and incor por ate th e obser ver ’s plausibility or der ing of possible plans [Wobck e, 20 0 2]. Th e oth er sig nificant effor t to use str ict consistency based appr oach to r ecog niz e an ag ent g oal fr om obser vation was done by Lesh [1998].

Lesh identified a set of dr awback s th at, accor ding to h im , h ad k ept for m al m eth ods fr om m ak ing sig nificant inr oads in th e ar ea of plan r ecog nition. He claim ed th at th e obstacles th at K autz ’s and oth er s faced wer e a) th e g ener ation of th e plan libr ar y, b) fast r ecog nition on h ug e plan libr ar ies [Lesh et al., 1995; Lesh et al., 1996], and c) consider ation of user pr efer ences to pr ior itiz e g oals [Lesh , 1997]. Instead of tak ing up th e m or e g ener al pr oblem of plan r ecog nition, Lesh , ch ose to tak e on a subset of th at pr oblem , g oal r ecog nition.

Lesh used a two pr ong ed appr oach to solve th e pr oblem of m assive plan libr ar ies. Lesh for m ulated a novel way to cr eate and or g aniz e plan libr ar ies. Th e fir st idea was to lim it th e libr ar y to only h ave r elevant plans and second to be able to access th e k nowledg e-base efficiently. Th e constr uction of th e plan libr ar y th at encodes all th e infor m ation available to th e r ecog niz er is usually left out in m ost fr am ewor k s, and is assum ed to be autom atically available to th e plan r ecog niz er [K autz , 1987]. Lesh defines a system th at would autom ate th e constr uction of th e libr ar y. A plan is included or discar ded fr om th e libr ar y based on a notion of bias bor r owed fr om concept lear ning [M itch ell, 1982]. Bias

(20)

r esear ch on plan-oper ator g r aph s [S m ith et al., 1993]. Lar g e sets of plans ar e com pactly r epr esented as g r aph s called cons is tency graph s . Th e idea beh ind consistency g r aph s is to k eep tr ack of only th ose g oals th at ar e consistent with th e obser ved action seq uence. Infor m ally, a g oal G is consistent with a seq uence of actions A if th er e is a plan P, wh ich wh en ex ecuted h as A as its pr efix and r esults in g oal G. In br oad ter m s a consistency g r aph is m ade up of ver tices th at ar e actions and th ese actions ar e connected by edg es wh en th ey suppor t one anoth er . Th e r ecog nition pr oceeds by r em oving inconsistent edg es and unsuppor ted actions fr om th e g r aph as new obser vations ar e m ade. Lesh pr ovides a sound consistency ch eck er (R IGS ) th at r eq uir es q uadr atic space and polynom ial tim e with r espect to th e num ber of actions and g oals in th e system . He also pr ovides a g oal r ecog niz er (BOC E) wh ich h e claim s tak es linear tim e with r espect to th e num ber of g oals, for cer tain types of g oals. Along with fast, sound and com plete g oal r ecog niz er s Lesh also developed an unsuper vised lear ning alg or ith m (AD APT) to fine tune th e plan libr ar y to user pr efer ences.

Alth oug h Lesh pr ovided a fr am ewor k to im pr ove th e efficiency of str ict consistency based r ecog niz er s h is wor k concentr ates on special case of plan r ecog nition, nam ely g oal r ecog nition. Goal r ecog nition answer s th e q uestion, ‘wh at is th e user tr ying to do?’ r ath er th an th e q uestion, ‘h ow is th e user tr ying to do it?’ Even th oug h Lesh ’s r ecog niz er is able to per for m ver y fast in th e test cases, som e r esear ch er s [Blaylock , 20 0 2] obser ve th at th is m ig h t be because of th e type of g oals r epr esented. In th e ex am ples consider ed by Lesh , r uling out som e g oals pr unes away h ug e sections of th e sear ch space. One obser vation we m ak e wh en we look at Lesh ’s consistency g r aph is th at h is g r aph wor k s at th e level of actions and is not concer ned with plans or plan level inter actions. Lesh ’s fr am ewor k m ak es sig nificant im pr ovem ent over K autz ’s fr am ewor k in ter m s of scalability and speed wh ile sacr ificing on ex pr essiveness [Blaylock et al., 20 0 3].

(21)

pr edicates ach ieved by th e obser ved actions m atch th e g oal sch em a. Th e advantag e of th is appr oach is th at it elim inates th e need for plan libr ar ies. As th e em ph asis is on r ecog niz ing par tially or fully ach ieved g oals r ath er th an tr ying to pr edict futur e actions, th is fr am ewor k does not m ak e ear ly pr edictions and needs to h ave seen sig nificant por tion of th e obser vations befor e m ak ing end pr edictions [Blaylock et al., 20 0 3].

Wh ile th er e is still wor k being done in developing for m al m eth ods for plan r ecog nition m ost of th e r ecent advancem ents h ave been in using uncer tain r easoning or pr obability th eor y to r ecog niz e plans fr om obser vations, as we will discuss in th e nex t section

2.2.3 P ro b ab il is t ic R ec o gn it io n M et h o ds

One of th e m ain com plaints about using deductive tech niq ues for plan r ecog nition is th at th ese tech niq ues ar e incapable of ch oosing between two plans in spite of th e fact th at one of th e plans is m or e lik ely th an th e oth er . To g ive an ex am ple fr om th e wor k done by C h ar niak and Goldm an [C h ar niak et al., 1993], let us say th at th e plan libr ar y consist of two plans one th at says “ an ag ent pack s h is bag s, g oes to th e air por t, boar ds a plane and g oes to Hawaii” and th e oth er th at says th at “ an ag ent pack s h is bag s, g oes to th e air por t and sets up cam p at th e air por t”. One of th e plans g iven above is ver y lik ely to h appen and th e oth er r ar ely h appens. For m al m eth ods of plan r ecog nition would g ive both th ese plans eq ual weig h t wh en it sees th e ag ent pack bag s and g o to th e air por t. Pr oponents of th e pr obability th eor y based r ecog nition ar g ue th at m ost for m al m eth ods ig nor e pr ior pr obabilities associated with plans and g oals.

(22)

nets but as our appr oach is based m or e on for m al m odels we will not discuss th em fur th er h er e [Huber et al., 1994; Pynadath et al., 20 0 0 ; Bui, 20 0 3; Albr ech t et al., 1998;]

D em pster -S h afer th eor y h as been used by som e to r eason about plans [Bauer , 1994; C ar ber r y, 1990 ; Bauer , 1994; Bauer , 1996]. One of th e ear ly attem pts at using D em pster -S h afer th eor y for plan r ecog nition was done by C ar ber r y [C ar ber r y, 1990 ]. Based on psych olog ical studies on h um an infer ence and decision m ak ing sh e devised a str ateg y th at could pr efer r ational default infer ence but defer unwar r anted conclusions until new evidence was collected th at suppor ted th em . Bauer [Bauer , 1994; Bauer , 1994; Bauer , 1996] ch ose to develop h is own fr am ewor k for plan r ecog nition based on D FT. Wh ile C ar ber r y’s wor k was lim ited to m ak ing default infer ences between plausible and im plausible plans Bauer ’s th eor y h elps m ak ing finely tuned selection between differ ent h ypoth eses. Bauer ’s r esear ch contends th at D S T can deal with par tial or total ig nor ance unlik e Bayesian m eth ods [Bauer , 1994]. M ost of h is later wor k was on incor por ating user pr efer ences in plan r ecog nition [Bauer , 1996].

It is ver y clear th at am big uity is unavoidable wh en dealing with plan r ecog nition wh ich m ak es it inevitable th at th eor ies lik e Bayesian pr obability and D S T will be necessar y to m ak e th e r ig h t ch oice. However th ese th eor ies if applied by br ute for ce will not scale well. Pr obability calculations ar e ver y ex pensive and th e siz e of Bayes nets can g r ow ex ponentially with th e siz e of th e dom ain [Lesh , 1998]. In new dom ains th ese m eth ods r eq uir e too m any num ber s th at ar e not r eadily available.

(23)

3

CO M P U TATI O N AL M O D EL O F P L AN RECO G N I TI O N

In th is section we descr ibe our plan r ecog nition alg or ith m in detail and fr am e it in th e contex t of oth er sim ilar wor k . In th e fir st par t of th is ch apter we define th e ter m s th at ar e r elevant to th e pr oblem space. Th ese ter m s will be used th r oug h th e r est of th e th esis. In th e later par ts of th e ch apter we descr ibe our alg or ith m and analyz e th e power and scope of th e sam e.

3.1

D e f i n i t i o n s

D ef in it io n 1: An ac t io n descr ibes th e ch ang es th at an ag ent can m ak e in th e wor ld. Our Action r epr esentation is based on th e PD D L 2.1 action definition with out th e inclusion of fluents [Fox et al., 20 0 3]. An action consists of 1) par am eter s – a list of var iables on wh ich th e action r ule oper ates, 2) pr econdition – a fir st or der statem ent th at m ust be satisfied befor e th e action can be applied, 3) effects – th e ch ang es th e action im poses on th e state of th e wor ld. Th e ch ang es ar e also r epr esented in fir st or der log ic but with out S k olem functions and disj unctions. Th e ac t io n l ib rary (Λ) lists all th e actions th at can be ex ecuted in th e dom ain

D ef in it io n 2: An o b s erv ed ac t io n is an action th at th e user ex ecutes in th e wor ld and is obser ved by th e r ecog niz er . An obser ved action contains no univer sal or ex istential q uantifier s and all var iables ar e bound.

D ef in it io n 3: Th e o b s erv at io n (A) is a totally or der ed set of obs erv ed actions. Th is is usually th e input to a plan r ecog niz er and cor r esponds to th e set of actions an ag ent h as per for m ed.

D ef in it io n 4: A p art ial p l an is a five-tuple: P = < T, O , B, S T, L > , wh er e:

o T is th e set of steps in th e plan. t0 and t∞ cor r esponds to th e fir st and last steps r espectively.

(24)

o O is th e or der ing r elationsh ips between th e steps in T. Th e fir st step in th e plan is always t0 and th e last step is t∞. Th e or der ing r elationsh ip is a binar y

r elationsh ip between each tim e step pair .

o B is th e co-desig nation and non-co-desig nation constr aints on th e var iables th at occur in th e plan actions.

o L is th e list of causal link s. A causal link is of th e for m ,

j P

i a

a → , and denotes a com m itm ent by th e planner th at th e pr econdition P of action aj will be

suppor ted by an effect of action ai

D ef in it io n 5: A p l an l ib rary is a collection of plans th at r epr esents th e com plete set of plans th e ag ent can ex ecute in th e dom ain.

D ef in it io n 6: An in s t an t iat ed p l an is a plan th at is being ex ecuted by an ag ent. An

ins tantiated plan can be th oug h t of consisting of two par ts: th e ins tantiated and th e

ex pected . Th e ins tantiated par t of th e plan contains actions th at ar e assum ed to h ave alr eady been ex ecuted and ar e called th e ins tantiated actions . Th e r est of th e actions in th e plan ar e called th e ex pected actions of th e plan, as th ey ar e ex pected to be ex ecuted in th e futur e to com plete th e plan.

D ef in it io n 7: Th e in it ial s t at e (I0) of th e wor ld is th e state at wh ich th e fir st obser ved

action was ex ecuted. Th e c urren t s t at e (In) of th e wor ld is th e state of th e system after

th e last obser ved action was ex ecuted.

D ef in it io n 8: Th e actions in a plan can be topolog ically sor ted based on th e or der ing r elationsh ips in th e plan into a discr ete tim e line. Each point on th e discr ete tim e line is called a t im e s t ep . Each action in th e plan occupies th e ear liest tim e s tep it can be ex ecuted.

D ef in it io n 9 : A g r ound action a is said to o c c ur n ex t in an instantiated plan p if it is possible to substitute a for any of th e ex pected actions in p in th e fir st tim e step after th e

ins tantiated actions in p,with out violating any of th e constr aints in p.

(25)

by g oing th r oug h actions in each tim e step and identifying all th e ways in wh ich th e causal link s in th e plan can be establish ed.

D ef in it io n 11: A p l an n in g grap h is defined in th e r esear ch by Blum and Fur st [1997]. It is r epeated h er e for com pleteness. Planning graph is a dir ected, leveled g r aph with two k inds of nodes and th r ee k inds of edg es. Th e levels in th e planning graph alter nate between prepos ition lev els containing prepos ition nod es and action lev els containing

action nod es . Th e g r aph star ts with a pr eposition level containing all th e pr epositions in

th e initial state of th e system . Action nodes in action level i ar e connected by

precond ition-ed ges to th eir pr econditions in th e pr eposition level i, by ad d -ed ges to th e add effects of th e actions in pr eposition level i+1, by d elete-ed ges to th e delete effects in pr eposition level i+1.

D ef in it io n 12: A n o -o p action node in an action level of a planning g r aph is added to th e g r aph to ensur e th at ever y pr eposition in level i appear s in pr eposition level i+1. Th e

no-op action is connected by a pr econdition-edg e to a pr eposition in level i and by an

add edg e to th e sam e pr eposition in level i+1.

D ef in it io n 13: Two action nodes a and b in a planning g r aph ar e consider ed m ut ual l y ex c l us iv e if eith er of th e two actions deletes a pr econdition or add-effect of th e oth er , or if th er e is a pr econdition of action a and a pr econdition of action b th at ar e m ar k ed as

m u tu ally ex clu s iv e of each oth er in th e pr evious pr eposition level.

Two pr eposition nodes p and q in a planning g r aph ar e consider ed m ut ual l y ex c l us iv e of each oth er if all ways of cr eating p ar e m u tu ally ex clu s iv e of all ways of cr eating q. Th is pr oper ty of m ut ual ex c l us io n between nodes is defined in th e r esear ch by Blum and Fur st [1997]. It is r epeated h er e for com pleteness.

3.2

Assu m p t i o n s

(26)

A s s um p t io n 2: All ex ecuted actions ar e obser ved. Th is assum ption is tr ue in dom ains wh er e th e r ecog niz er is an integ r al par t of th e envir onm ent.

A s s um p t io n 3: Th e plans ex ecuted by th e ag ent in th e system ar e all valid plans. Th is m eans th at th e plan can be r epr esented as a ser ies of totally or der ed actions wh ich can be ex ecuted in seq uence to r each fr om th e initial state to th e g oal state and for ever y action at th e tim e step of its ex ecution all its pr econditions h ave been m et.

A s s um p t io n 4: If th e ag ent is ex ecuting m ultiple plans in par allel th e ag ent will r each th e g oals state of each plan eith er at th e end or as an inter m ediate state of th e com bined plan.

3.3

Al g o r i t h m

Th e input to our r ecog niz er is th e set of obser ved actions, th e cur r ent state of th e dom ain, and th e libr ar y of plans in th e ch osen dom ain. Th e output of th e r ecog niz er is th e set of plans th e ag ent is ex ecuting and th e ex pected actions.

Th e alg or ith m is an incr em ental r ecog niz er and is based on building a planning g r aph sim ilar to GR APHPLAN [Blum et al., 1997]. Th e cur r ent state, In is tak en to

r epr esent th e star ting state of th e planning g r aph and ex actly lik e in GR APHPLAN , a planning g r aph is cr eated with alter nating action and pr eposition levels. Also sim ilar to GR APHPLAN , m utual ex clusivity is tr ack ed between actions and between pr epositions at each level. Th e focus of th e alg or ith m will be to pr edict th e nex t actions based on th e planning g r aph . Th e planning g r aph r epr esents th e possible plans in pr og r ess g iven th e obser vations, th is im plies th at a subset of pr epositions Is fr om a g iven pr oposition level

sh ould r epr esent th e interm ed iate s tate of an instantiated par tial plan th at th e ag ent is ex ecuting . Each par tial plan in th e plan libr ar y consists of a finite set of inter m ediate states. As th e plan libr ar y is available and assum ed to be com plete for a dom ain, th e inter m ediate states can be deter m ined pr e-r untim e. Given th e pr oposition level and th e inter m ediate states of a par tial plan, a subset Is can be found in th e pr eposition level, th at

m atch es one or m or e inter m ediate states in th e par tial plan. Is sh ould not contain m utually

ex clusive pr epositions. If th er e ex ists a valid plan th at can establish Is fr om In it can be

(27)

a plan ex ists it is a candidate solution and can be used to pr edict futur e actions of th e ag ent.

Th is alg or ith m identifies m ultiple plans th at could ex plain th e obser ved actions, and one or m or e of th ese plans could be th e plan th e ag ent is ex ecuting . It would be unr easonable to ex pect th e r ecog niz er to identify th e ex act plan th e ag ent is g oing to ex ecute. Th e r ecog niz er h as access to par tial infor m ation about th e intention of th e ag ent (th e obser ved actions). To m ak e an ex act pr ediction based on par tial infor m ation, th e r ecog niz er would h ave to r esor t to unsound r easoning . Th e r ecog niz er h owever does m ak e th e assum ption th at th e plan libr ar y is com plete and th e ag ent is ex ecuting plans fr om th e plan libr ar y. If th is assum ption was not m ade ever y valid plan contained in th e planning g r aph would be a candidate plan, wh ich could be a lar g e set. Th e assum ption about th e com plete plan libr ar y h elps th e r ecog niz er lim it th e num ber of plans in th e planning g r aph it consider s as candidate. Our plan r ecog niz er does not j um p to conclusions by m ak ing an unsound ch oice on th e candidate plan.

C reat e_P l an n in g_G rap h

( In - Th e cur r ent state of th e dom ain (input) Λ - Action libr ar y (input)

PG – Planning g r aph ex panded up to k levels. (output)

k – N um ber of pr eposition levels in PG (input)

)

Th is pr ocedur e cr eates a planning g r aph as descr ibed in th e GR APHPLAN alg or ith m [Blum et al., 1997]. Th e planning g r aph is ex panded to k levels stopping at a pr eposition level.

1. Initializ e

1.1. S et PG to r epr esent In with none of th e pr eposition pair m ar k ed as m utual ex clusive.

1.2. S et counter = 0 .

(28)

2.1.1. Its pr econditions can be suppor ted by pr epositions in th e pr evious level 2.1.2. N one of th e pr econditions h ave been m ar k ed m utually ex clusive

2.2.Add no-op actions th at h ave sam e pr econditions and effects. 2.3. Add edg es connecting pr econditions to actions.

2.4.For each action in action level tr ack all m utual ex clusivity with oth er actions in th e level

3. If th e last level was action level cr eate th e nex t pr eposition level 3.1.Add effects of th e actions in th e pr evious level

3.2. C onnect th e effects with th e actions using add or delete edg es

3.3. M ar k two pr epositions as ex clusive if all ways of g ener ating one is ex clusive of ways of g ener ating th e oth er

3.4. Incr em ent counter

4. if (counter > = k) r etur n PG else g o back to step 2.

I den t if y _I n t erm ediat e_S t at e

( PL – Pr opositions at a pr oposition level in a planning g r aph (input)

p – Par tial Plan (input)

inst

P - { (pinst,Ibs) | pinst is an instantiated plan obtained by instantiating th e input

par tial plan p with a inter m ediate state of Ibs wh er e Ibs ∈PL (output)

)

Th is pr ocedur e g iven a par tial plan and a pr oposition level identifies all th e inter m ediate states th at ar e establish ed by a subset of th e pr eposition level.

1. Initializ e Pinst to a null set.

2. Loop th r oug h each inter m ediate state in p

2.1. If th e inter m ediate state Ibs is a subset of th e pr epositions in PL .

2.1.1. Add binding s to p and cr eate an instantiated plan pinst for th e inter m ediate

state Ibs.

2.1.2. Add (pinst,Ibs) to Pinst.

(29)

C h ec k _I n t erm ediat e_S t at e

( Ibs - A inter m ediate state (input)

PG – a planning g r aph (input)

inst

p - th e instantiated par tial plan for wh ich Ibs is th e inter m ediate state. (input)

q – eith er a valid par tial plan star ting at In th at establish es Ibs or null. (output)

)

Th is pr ocedur e ch eck s to see if a g iven set of pr epositions (Ibs) can be establish ed star ting fr om th e cur r ent state In using actions fr om th e action libr ar y. Th is is done using a back war d ch aining alg or ith m sim ilar to GR APHPLAN . However in th is case we h ave th e instantiated par tial plan as a g uide.

1. Initializ e

1.1. g oal G = Ibs

1.2. tim e-step = t, planning g r aph level = t

2. In pinst find th e actions in last tim e-step th at establish ed th e pr epositions inG.

3. In th e planning g r aph PG find th e actions in th e last action level (no-op included) th at h ave pr epositions in Ibs as add effects. C h oose actions th at ar e not ex clusive of any action th at h as alr eady been selected. U se actions identified in step 2 as g uide 4. If cannot find action to satisfy G g o back up one tim e-step and PG level and tr y

anoth er set of actions star ting at step 2. If tim e step is t and all possible actions h ave been ch eck ed r etur n null.

5. If not at initial state

5.1. r eset G = pr econdition of identified actions 5.2. decr em ent tim e-step and PG level

5.3. g o back to step 2.

6. Th e path of actions is identified fr om initial state to g oal state th en, 6.1.q = pinst

(30)

6.3. r etur n q

R ec o gn iz er

( ∏ - Libr ar y of par tially or der ed plans, (input)

n

I - Th e cur r ent state of th e dom ain (input) Λ - Action libr ar y (input)

k - N um ber of pr eposition levels in PG (input)

P - r ecog niz ed candidate plans (output)

)

Th is pr ocedur e identifies th e par tial plans in th e plan libr ar y th at can ex plain th e cur r ent state of th e planning g r aph as an inter m ediate state with in th e plan.

1. I n it ial iz e

1.1. P to an em pty set 2. G rap h G en erat io n

2.1. C r eate planning g r aph PG = c reat e_p l an n n in g_grap h (In,Λ, k ) 2.2. Get final pr eposition PL level fr om PG

3. G rap h A n al y s is

3.1. For each p∈Π do th e following steps

3.1.1. Get th e set of instantiated plans PI = iden t if y _in t erm ediat e_s t at e(PL , p) 3.1.1.1. For each (pinst,Ibs)∈PIloop

3.1.1.1.1. Find q = c h ec k _in t erm ediat e_s t at e(Ibs,pinst , PG ).

3.1.1.1.2. If q not null add (q,Ibs) to P.

3.4

Asse r t i o n s

C l aim 1: Th e plan recogniz er is s ou nd .

(31)

1. All th e plans in th e plan libr ar y ar e valid plans.

2. An inter m ediate state is a state in a par tial plan th at can be r each ed by ex ecuting som e of th e actions in th e par tial plan with out violating any of its constr aints.

3. GR APHPLAN uses a back war d-ch aining sear ch alg or ith m to identify a path of actions th at lead fr om a g oal-set in th e final pr eposition level to th e initial pr eposition level. In th eir paper Blum and Fur st [1997] h ave sh own th at th e back war d ch aining sear ch alg or ith m r etur ns valid plans. In our r ecog niz er we h ave im plem ented th e

ch eck_ interm ed iate_ s tate pr ocedur e th at tak es a subset of th e cur r ent pr eposition level and uses th e sam e alg or ith m as th e GR APHPLAN sear ch to find a valid plan to suppor t th e pr eposition set.

4. With th e facts g iven above, wh en our plan r ecog niz er com es up with a par tial plan

inst

p at an inter m ediate state Ibsas a possible ex planation (S tep 3.1.1 above), it h as to be ver ified by th e ch eck_ interm ed iate_ s tate pr ocedur e.

5. Being ver ified by th e ch eck_ interm ed iate_ s tate pr ocedur e im plies a valid plan ex ists star ting at th e initial state I0 to th e state Ibs(fr om fact 3 listed above).

6. Given th at th e inter m ediate state Ibsh as can establish ed using th e plan r etur ned by th e

ch eck_ interm ed iate_ s tate pr ocedur e, th e r est of th e instantiated plan,pinst, can be

ex ecuted to com plete th e plan. Th is is possible as all th e causal link s to ex ecute th e ex pected actions of th e instantiated plan h as been establish ed (see definition of inter m ediate state).

7. S tatem ent (6) above im plies th at th e identified par tial plan is a possible plan th e ag ent is ex ecuting , in oth er wor ds our plan r ecog niz er is sound in its infer ence.

C l aim 2: I f an agent is ex ecu ting a v alid plan, ev en in th e cas e w h ere th e ex ecu tion is in parallel w ith oth er plans at leas t one of th e interm ed iate s tates of th e plan w ill be reach ed by th e agent.

R eas o n in g:

(32)

2. Th e g oal state of a plan is one of its inter m ediate states as per th e definition of inter m ediate states

3. Fr om statem ents (1) & (2) we can say th at, if th e ag ent is ex ecuting a valid plan fr om th e plan libr ar y at least on of th e inter m ediate states of th e plan will be r each ed by th e ag ent.

C l aim 3:I f an agent is ex ecu ting a v alid plan, ev en in th e cas e w h ere th e ex ecu tion is in parallel w ith oth er plans , and an interm ed iate s tate is reach ed as part of th e ex ecu tion, th is interm ed iate s tate w ill be a s u bs et of th e prepos itions at one of th e prepos ition lev el in th e planning graph . N o prepos ition in th e s u bs et w ill be m u tu ally ex clu s iv e.

R eas o n in g:

1 An ag ent ex ecuting one or m or e plans fr om th e plan libr ar y does so by per for m ing a ser ies of actions in an or der . Let us call th is th e ex ecu tion path of th e plan.

2 Th e inter m ediate state r each ed by th e ag ent is between two actions in th e ex ecution path .

3 We k now fr om Blum and Fur st [1997] th at th e planning g r aph h as a weak er constr aint th an th e constr aints on valid plans so if th er e is a valid plan it will be par t of th e planning g r aph .

4 Fr om statem ents (1) and (3) and assum ption 3 descr ibed in th e pr evious section, we k now th at ex ecution path is par t of th e plan g r aph .

5 Fr om th e definition of th e planning g r aph we k now th at th e states between th e actions in th e ex ecution path ar e subsets of th e cor r esponding pr eposition levels.

6 S ince th er e ex ists a plan (th e ex ecution path ) th at suppor ts th e pr eposition subset, no pr eposition in th e subset is m utually ex clusive.

C l aim 4:O u r plan recogniz er is com plete w ith res pect to th e plan library . In oth er wor ds we can say th at, if any plan in th e plan libr ar y is a possible candidate it will be identified by our plan r ecog niz er .

R eas o n in g:

(33)

2. Fr om claim 2 we can say th at at least one of its inter m ediate-state will be r each ed.Let us call th at stateIs.

3. Fr om claim 3 above we can say th at Is would be a subset of a pr eposition level. Th e

inter m ediate Iswill be identified as a subset of PL by th e pr ocedur e id entif y _ interm ed iate_ s tate(PL , q), wh er e PL is th e pr eposition level.

4. Wh en we r un th e pr ocedur e ch eck_ interm ed iate_ s tate on th e inter m ediate state Is it

will r etur n success. Th is we can say for sur e because Is is th e inter m ediate state of a

valid plan being ex ecuted by th e ag ent. In oth er wor ds it is par t of th e ex ecution path . Also, Blum and Fur st [1997] sh ow th at th eir back war d sear ch alg or ith m , th at we h ave im plem ented, is sound and com plete. If th er e is a valid plan it will be found.

5. Fr om statem ent (4) we can say th at any plan th at th e ag ent is ex ecuting fr om th e plan libr ar y will be identified.

3.5

An a l y si s

Having descr ibed th e alg or ith m in th e ear lier section and h aving ex plor ed som e claim s about our alg or ith m in th e pr evious section, in th is section we tr y to descr ibe th e asym ptotic beh avior of our alg or ith m and com par e it with oth er alg or ith m s in th e liter atur e.

Our alg or ith m consist of th r ee m ain pr ocedur es nam ely create_ planning_ graph ,

id entif y _ interm ed iate_ s tate and ch eck_ interm ed iate_ s tate. Th e create_ planning_ graph

pr ocedur e is based on sim ilar g r aph cr eation alg or ith m used in th e GR APHPLAN alg or ith m [Blum et al., 1997]. Based on th e th eor em pr oved by Blum and Fur st we can say th at th e siz e of th e planning g r aph and th e tim e tak en to cr eate it would be polynom ial in th e leng th of long est add list of any action, num ber of obj ects, num ber of pr epositions in th e initial conditions, th e num ber of possible actions and th e num ber of levels th e g r aph is ex tended.

(34)

th e plans in th e plan libr ar y is a finite q uantity. Th e plan libr ar y contains th e sam e plans for ever y r un of th e r ecog niz er . Wh ich m eans th e inter m ediate states for all th e plans in th e plan libr ar y could be com puted ah ead at desig n tim e and does not h ave to be deter m ined at r untim e. We will talk about th e asym ptotic beh avior of our alg or ith m in ter m s of th e total num ber of inter m ediate states and not th e total num ber of plans in th e plan libr ar y. In th e id entif y _ interm ed iate_ s tate pr ocedur e of our alg or ith m , ever y inter m ediate state in th e plan libr ar y needs to be com par ed to th e pr epositions in a pr eposition level. Th e com par ison pr oceeds by ch eck ing if ever y pr eposition th at is tr ue in th e inter m ediate state is tr ue in th e pr eposition level, and to also ch eck ing th at no two pr epositions in th e inter m ediate state ar e m ar k ed as m utually ex clusive in th e pr eposition level. Th is ch eck would be a polynom ial function of th e num ber of pr epositions in th e pr eposition level and th e num ber of inter m ediate states in th e plan libr ar y.

Th e th ir d pr ocedur e in our alg or ith m ch eck_ interm ed iate_ s tate does a back war d ch aining sear ch th r oug h th e planning g r aph to see if th er e ex ists a valid plan th at could establish th e inter m ediate state fr om th e cur r ent state after th e obser vation. Th e com plex ity of a back war d ch aining sear ch in th e wor st case will be ex ponential. At ever y action level th is sear ch needs to consider all th e possible sets of actions th at establish es th e g oal state and so th e com plex ity will be ex ponential in th e num ber of action at each level of th e planning g r aph . However as K h am bh am pati [1997] h as sh own th e power of GR APHPLAN is in its usag e of th e planning g r aph to r epr esent a pr uned state-space sear ch tr ee, using m utex pr opag ation. Th e efficiency of GR APHPLAN is based on th e pr opag ation of m utex r elationsh ips. Th e back war d ch aining sear ch in our alg or ith m also h as th e advantag e of h aving an identified par tial plan. Th e sear ch can use th e par tial plan as a h eur istic to g uide th e ch oice of actions at each action level. Th is h eur istic m ig h t sig nificantly r educe th e num ber of path s th at need to be ch eck ed befor e we identify a valid plan.

3.6

I m p l e m e n t a t i o n

(35)
(36)

4

EX AM P L ES

In th is ch apter we use som e ex am ple dom ains to descr ibe th e alg or ith m pr esented in th e pr evious ch apter . Th e fir st ex am ple we will use to h ig h lig h t th e alg or ith m will be fr om th e cook ing dom ain. Th is ex am ple will be followed by an ex am ple about vacation planning .

4.1

Co o k i n g D o m a i n

Th e cook ing dom ain plan libr ar y consist of four possible plans, m ak ing a m eatless pasta dish , pasta with m eat, a m eatless salad and a salad with m eat.

(37)

Figure 4.2: T h e C o o k in g D o m ain P l an L ib rary

(38)

Let us assum e th at th r ee actions wer e obser ved by th e plan r ecog niz er and th ey wer e nam ely

b o il (FE T T U C I N E ) m ak eS auc e(A L FR E D O ) gril l (C H I C K E N )

Th e state of th e system after th e obser ved actions is

P rep ared(FE T T U C I N E )^ em p t y (P L A T E )^ h as S auc e(A L FR E D O ) ^ p rep ared(C H I C K E N )^ ~p rep ared(L E T T U C E )

Th e fig ur e 4.3 sh ows th e ex pansion of th e planning g r aph by one pr epositional-level using th e create_ planning_ graph pr ocedur e. Th e h ig h lig h ted actions cor r espond to th e obser ved actions. Th e nex t level sh ows pr edicted actions based on th e cur r ent stateIn. Given th e pr eposition level PL and th e plan libr ar y (∏), doing th e g r aph analysis as

ex plained in th e recogniz er pr ocedur e above, we can identify th e inter m ediate state for each p∈Π. Each plan instance, (pinst,Ibs)∈PI, identified in th e g r aph analysis step is

g iven below in th e following table (Table 4.1). Th e table sh ows wh at th e nex t ex pected action is for th e identified instantiated plan and also th e valid plan r etur ned fr om

ch eck_ interm ed iate_ s tate pr ocedur e. Ex tending th e planning g r aph based on th e ex pected

(39)

T ab l e 4.1: C o o k in g D o m ain R ec o gn iz er R es ul t s

bs

I pinst O b s e r v e d A c t i o n s E x p e c t e d A c t i o n

h a s S a u c e (A L F R E D O ) , p r e p a r e d (F E T T U C I N I ) , e m p t y (P L A T E )

M a k e P a s t a D i s h B o i l (F E T T U C I N I ) , M a k e S a u c e (A L F R E D O )

P l a t e P a s t a (F E T T U C I N E )

h a s S a u c e (A L F R E D O ) , p r e p a r e d (F E T T U C I N I ) , p r e p a r e d (C H I C K E N ) , e m p t y (P L A T E )

M a k e M e a t P a s t a D i s h B o i l (F E T T U C I N I ) , M a k e S a u c e (A L F R E D O ) , G r i l l (C H I C K E N )

P l a t e P a s t a (F E T T U C I N E )

A d d M e a t (C H I C K E N )

~ p r e p a r e d (L E T T U C E ) , e m p t y (P L A T E )

M a k e P l a i n S a l a d C h o p (L E T T U C E )

P l a t e S a l a d (L E T T U C E ) ~ p r e p a r e d (L E T T U C E ) ,

P r e p a r e d (C H I C K E N ) e m p t y (P L A T E )

M a k e M e a t S a l a d G r i l l (C H I C K E N ) C h o p (L E T T U C E )

P l a t e S a l a d (L E T T U C E )

A d d M e a t (C H I C K E N )

Th e cook ing dom ain is a sim ple dom ain with not m uch var iety in th e num ber of possible path s th at an ag ent can tak e. However it is useful to sh ow th e wor k ing s of th e alg or ith m and also h ig h lig h t th e power of m utual ex clusivity in nar r owing th e possible ex planations pr oduced by th e alg or ith m . We will now m ove on to anoth er ex am ple th at h as a little bit m or e var iety.

4.2

V a c a t i o n D o m a i n

In th is ex am ple we descr ibe a vacation scenar io, wh er e th e plan libr ar y consists of th e five types of vacation plans. Two of th em involve g oing to th e beach , one involves g oing on a flig h t, one tak ing a cr uise and one vacation plan is about g oing to th e th eater .

Let us assum e th at two actions wer e obser ved by th e plan r ecog niz er and th ey wer e nam ely,

p ac k (L U G G A G E ) b uy _t ic k et s (T H E A T E R ).

(40)

~p ac k ed(L U G G A G E )^ at (H O M E , L U G G A G E )^ at (H O M E , A G E N T )

U sing th ese two pieces of infor m ation we can dr aw th e planning g r aph as descr ibed in our plan r ecog nition alg or ith m . Th e fig ur e 4.6, below, sh ows th e planning g r aph g ener ated for th is dom ain. Th e g r aph in th e fig ur e h as been g ener ated up to th r ee action levels and four pr eposition levels. Even th oug h th e g r aph can be ex tended to m ultiple levels, as th e num ber of levels incr eases th e num ber of states th at can be r each ed also incr eases. As th e num ber of possible pr edicates incr eases, th e num ber of possible plans th at could ex plain th e obser vation also incr eases, wh ich m eans th e pr edictive power of th e alg or ith m decr eases as th e depth of th e g r aph incr eases. On th e oth er h and as th e plan g r aph is ex tended th e num ber of m utual conflicts am ong pr epositions could also possibly incr ease wh ich would r educe th e num ber of valid pr eposition subsets and h ence th e num ber of candidate plans.

Th e state of th e system after th e obser ved actions ar e ex ecuted is

p ac k ed(L U G G A G E )^ at (H O M E , L U G G A G E )^ at (H O M E , A G E N T )^ h as _t ic k et s (T H E A T E R )

Th e only actions th at ar e possible at th is state ar e h ailing for a cab or buying tick ets. Having h ailed a cab th e ag ent h as tr anspor t to tr avel. Th e details of th e planning g r aph ar e sum m ar iz ed in th e fig ur e 4.6 below.

(41)

Figure 4.4: T h e V ac at io n D o m ain A c t io n s

(42)
(43)

Figure 4.6: T h e V ac at io n D o m ain P l an n in g G rap h A

Table 4.2 g ives instantiated plans th at could be in pr og r ess g iven th e obser ved actions r etur ned fr om step 3.1.1.1.2 (r ecog niz er ), som e inter m ediate states and instantiated plans wer e elim inated in th e pr evious steps of th e r ecog niz er . Ex am ples of a subsets of th e pr eposition level th at does not m atch any inter m ediate plan state ar e at (A I R P O R T , C A R ) ^ at (H O M E , A G E N T ) or at (H O M E , A G E N T ) ^ at (A I R P O R T , L U G G A G E ). Th ese pr eposition set will be filter ed out by th e id entif y _ interm ed iate_ s tate pr ocedur e. On th e oth er h and not all th e instantiated plans identified in step 3.1.1 (r ecog niz er ) will r etur n a valid plan fr om th e pr ocedur e ch eck_ interm ed iate_ s tate in th e step 3.1.1.1.1 (r ecog niz er ). For ex am ple th e instantiated plan (rent-car-and -go-to-beach , in (C A R , L U G G A G E ) ^ at (H O M E , C A R ) ^ at (H O M E , A G E N T )) does not m atch any valid subset at th e g iven pr eposition level and so cannot g ener ate a valid plan.

(44)

T ab l e 4.2: V ac at io n D o m ain R ec o gn iz er R es ul t s

bs

I pinst O b s e r v e d A c t i o n s E x p e c t e d A c t i o n s P a c k e d (L U G G A G E )

^ a t (A I R P O R T , A G E N T ) ^ a t (H O M E , L U G G A G E )

R e n t c a r a n d g o t o b e a c h

P a c k (L U G G A G E ) H a i l (H O M E , C A B )

D r i v e (H O M E , A I R P O R T )Rent_ c a r ( )

H a s _ t i c k e t s (A I R P L A N E ) ^ i n (C A B , L U G G A G E ) ^ a t (H O M E , A G E N T ) ^ a t (H O M E , C A B )

F l y a w a y f r o m h o m e

P a c k (L U G G A G E ) H a i l (H O M E , C A B )

B u y _ t i c k e t s (A I R P L A N E )

L o a d _ l u g g a g e () D r i v e( H O M E , A I RP O RT )

H a s _ t i c k e t s (C R U I S E ) ^ i n (C A B , L U G G A G E ) ^ a t (H O M E , A G E N T ) ^ a t (H O M E , C A B )

G o o n a c r u i s e P a c k (L U G G A G E ) H a i l (H O M E , C A B )

B u y _ t i c k e t s (C R U I S E )

L o a d _ l u g g a g e () D r i v e( H O M E , P O RT )

a t (T H E A T E R , A G E N T ) ^ h a s _ t i c k e t s (T H E A T E R )

G o t o t h e a t e r P a c k (L U G G A G E )

B u y _ t i c k e t s (T H E A T E R )

H a i l (H O M E , C A B )

D r i v e (H O M E , T H E A T E R ) W a tc h _ S h o w ( )

i n (C A B , L U G G A G E ) ^ a t (H O M E , C A B ) ^ a t (H O M E , A G E N T )

D r i v e t o b e a c h

P a c k (L U G G A G E ) H a i l (H O M E , C A B )

L o a d _ l u g g a g e () D r i v e( H O M E , B E A C H )

Given th e pr oposition level as sh own in th e planning g r aph we can see th at th e inter m ediate states identified in Table 4.2 ar e still tr ue. However if th e nex t action obser ved is D riv e(H O M E , T H E A T E R ) th e g r aph ch ang es as sh own in fig ur e 4.8

T ab l e 4.3: V ac at io n D o m ain R ec o gn iz er R es ul t s

bs

I pinst O b s e r v e d A c t i o n s E x p e c t e d A c t i o n s

a t (T H E A T E R , A G E N T ) ^ h a s _ t i c k e t s (T H E A T E R )

G o t o t h e a t e r P a c k (L U G G A G E )

B u y _ t i c k e t s (T H E A T E R )

H a i l (H O M E , C A B )

D r i v e (H O M E , T H E A T E R )

W a tc h _ S h o w ( )

(45)

Figure 4.7: T h e V ac at io n D o m ain P l an n in g G rap h B

Figure 4.8: T h e V ac at io n D o m ain P l an n in g G rap h C

(46)

to th e initial state and all oth er plans in th e plan libr ar y will ag ain becom e possible. Th is ex am ple sh owed h ow as obser ved actions com e in one by one; th e r ecog niz er incr em entally updates its inter nal m odel and g ives th e ex planations for th e obser ved actions using our alg or ith m .

Th e two r ecog nition pr oblem s descr ibed in th is ch apter sh ed lig h t on th e m ech anism of th e alg or ith m descr ibed in th e pr evious ch apter . Th e ex am ples sh ow th at in pr oblem s wh er e plans ar e built on sim ilar seq uence of actions, it is usually h ar d to g uess th e

intention of th e ag ent based on lim ited set of obser vations. It will always be possible fr om th e planning g r aph to identify m ultiple plans th at could ex plain th e obser ved actions. If th e plan space is seg m ented, in th e sense th at, g oing down one set of steps pr events th e possibility of anoth er set of plans and m utual ex clusion between actions is th e dom inant sour ce of conflict between plans, th en th is appr oach clear ly h as an advantag e.

(47)

5

AN AL Y I S O F TH E RECO G N I Z ER

Th e pr evious ch apter descr ibes th e plan r ecog nition alg or ith m and ex plor es its r each th r oug h m ultiple ex am ples. Th is ch apter tr ies to place th e alg or ith m in th e contex t of cur r ent liter atur e and com par es th e sim ilar ities and differ ences with oth er r ecog niz er s.

5.1

Co m p a r i so n w i t h P e e r s

Figure

Figure 1.1 : Schematic Representation of Plan Recognition systems
Figure 2.1 : Sample Event Hierarchy Kautz [1987]
Figure 4.1: The Cooking Domain Actions
Figure 4.2: The Cooking Domain Plan Library
+7

References

Related documents