2.2 Goal Recognition
2.2.2 Incremental plan recognition
Jigui and Minghao (2007) developed IPR, a framework for plan recognition that narrows the set of possible goal sets by incrementally pruning a plan graph as actions are observed. (As a plan recognition approach, it can also solve goal recognition problems.) In this work, a plan recognition problem is defined as a tuple T = h P , G , O i where P is a planning domain and initial conditions, G is a set of possible goal sets or hypotheses, and O is an observed action sequence O = (o1, ..., on)where each onis a tuple h an, tni where anis an observed action and tnis the time step in which anhas been observed. O may be incomplete, but the time step is known. Therefore, the observed sequence is essentially ordered. The solution to a plan recognition problem is any plan π = (ai, ..., an)consistent
with the sequence of actions O. A plan solution π = (a1, ..., an)is consistent with a sequence of observed actions O = (ha1, t1i, ..., han, tni), if the time steps of the observed actions coincide with the time steps in which the actions in the plan so- lution occur. For instance, assuming the following sequence of observed actions O = (ha, 0i, hb, 2i hc, 3i), π1 = (a, c, b, c)and π2 = (a, d, b, c)are consistent with O, but not π3= (a, b, d, c).
In general, IPR consists of building a plan graph to determine which actions and which propositions are true (1), false (-1), or unknown (0) given the obser- vations. The process starts at level zero where it is assumed that the initial state is true. As a consequence, every proposition has value 1. In addition, when an action is observed at a level it gets value 1. The process incrementally builds a plan graph and updates it level by level. The values of propositions and actions are updated according to the following rules:
1. An action in the plan graph gets value -1 when any of its preconditions or any of its effects is -1.
2. An action in the plan graph gets value 1 when it is the sole producer of an effect that has value 1.
3. A proposition in the plan graph gets value -1 when all of its producers are -1, (noop) included.
4. A proposition in the plan graph gets value 1 when any of its consumers or any of its producers is 1.
5. An action or proposition in the plan graph gets value -1 when it is mutually exclusive with an action or proposition that has value 1.
The process results in a plan graph where each proposition and each action is labeled as 1, -1, or 0. Those propositions and actions identified as -1 can be ignored for plan recognition purposes, meaning that these are pruned from the resulting plan graph. The approach backward searches for a plan consistent with Oin the pruned plan graph.
This propagation and pruning technique is also useful to identify potential goal sets in goal recognition problems using the set of goals remainder in the plan graph. Each proposition labeled as 1 is considered a known goal and each proposition labeled as 0 is considered a possible goal, while each proposition labeled as -1 cannot be a goal.
To illustrate this propagation and pruning technique, consider our simple lo- gistics problem described in Figure 2.1. Suppose that the sequence of observed
P0 at a trk 1 at a pkg 1 A0 load pkg a trk 1 P1 at a trk 1 at a pkg -1 in trk pkg 1 A1 load pkg a trk -1 verify pkg a trk 1 P2 at a trk 1 at a pkg -1 in trk pkg 1 verified pkg trk 1 A2 load pkg a trk -1 verify pkg a trk 0 scan pkg trk 0 drive trk a b -1 P3 at a trk 1 at a pkg -1 in trk pkg 1 verified pkg trk 1 scanned pkg trk 0 at b trk -1 A3 load pkg a trk -1 verify pkg a trk -1 scan pkg trk 0 drive trk a b 1 unload pkg trk b -1 P4 at a trk -1 at a pkg -1 in trk pkg 0 verified pkg trk 0 scanned pkg trk 0 at b trk 1 at b pkg -1 1 -1 1 -1 1 1 -1 1 0 -1 -1 0 0 0 -1 P0 at a trk at a pkg A0 load pkg a trk P1 at a trk in trk pkg A1 verify pkg a trk P2 at a trk in trk pkg verified pkg trk A2 verify pkg a trk scan pkg trk P3 at a trk in trk pkg verified pkg trk scanned pkg trk A3 scan pkg trk drive trk a b P4 in trk pkg verified pkg trk scanned pkg trk at b trk
Figure 2.8: A partial plan graph with status values of propositions and actions.
actions is (verify pkg trk a) at level 1 and (drive trk a b) at level 3. Figure 2.8 shows the plan graph for this problem in the upper half. The numbers above the propositions and actions are the values for each of them, computed using the above propagation rules. The lower image shows the resulting pruned plan graph. As a result of the propagation, (load pkg a trk) must be true (value 1) at level 0 because its preconditions (at a trk) and (at a pkg) are true (value 1) at level 0. As a consequence of (load pkg a trk) being true, its effect (in trk pkg) is also true (value 1) at level 1. At level 2, (verified pkg trk) must be true because (verify pkg a trk) was observed. Since (verify pkg a trk) and (noop-at a pkg) are mutually exclusive, action (noop-at a pkg) and its effect (at a pkg) are false (value -1). As a consequence of (at a pkg) being false, (load pkg a trk) is false at level 2. Action (scan pkg trk) is unknown (value 0) at level 2 since there is not enough information to determine whether it is true or false. Action (drive trk a b) is true at level 3 since it was observed. As a result, (at b trk) is true at level 4. Actions (noop-at a trk) and (unload pkg trk b) are false at level 3 since they are mutually exclusive with the observed action (drive trk a b). As a consequence of (unload pkg trk b) being false, (at b trk) is also false at level 3, which makes (drive trk a b) false at level 2. Likewise, the consequence of (noop-at a trk) being false results in
(at a trk) being false too. Proposition (scanned pkg trk) is unknown at every level since there is not enough information to label it.
The propagation technique results in a plan graph where at level 5 (at a trk) and (at a pkg) are false (value -1), and (in pkg trk), (verified pkg trk), (scanned pkg trk), (at b trk), and (at b pkg) are unknown (value 0). In terms of goal recognition, this means that propositions (at a trk) and (at a pkg) are dismissed as a solution, while (in pkg trk), (verified pkg trk), (scanned pkg trk), (at b trk), and (at b pkg) are possible goals solutions.