SUMMARIZE-TRACE, whose pseudo-code is given in Figure 4, removes actions from the execution trace in four passes. The first pass does almost all of the summarization; the underlying justifications for the pruning criteria used during this pass are fairly self-evident. The third pass is really part of the preparation process of updating collective memory. However, removing planner-reconstructible operators at this point during summarization simplifies both the next pass of summarization, which removes communication related to those operators, and the reorganization which precedes preparation.
|
| Figure 4: Algorithm to summarize traces. |
The second summarization pass requires some explanation. This step is designed to weed-out operators that seemed to be useful at the time, but eventually were not. For example, suppose a hand-truck operator (HTO) gets a lifter (L1) to load a box onto a hand-truck, which HTO then pushes to the street and stands up. Suppose further that no lifter agreed to unload the box when it was at the street and HTO eventually pushed the hand-truck containing the box back to the box's original location. At this point, L1 unloads it from the hand-truck, carries it (back) to the street and loads it onto the truck. In this case, HTO's request did not help to achieve the goal and should be removed from the summary.
The simplest plan that lifters learn that their first-principles planner does not construct is to load a box onto a hand-truck and then later unload it and load it onto a truck at the behest of a hand-truck operator. This chunk can get created from the following snippet of activity involving medium-sized box MBOX3.
First, a high-level description:
L1 records her behavior internally in each round of activity, including information about that round's active goals, cooperation agreements, state of the world, attempted action, reason for attempting the action, and result of the attempt. These internal structures contain too much data to show fully, but the gist of them is clear in the following description of L1's execution trace:
(<agreed to achieve (ON MBOX3 HANDTR2) for HTO> <executed (LIFT MBOX3)> <executed (LOAD MBOX3 HANDTR2)> <failed to (LIFT LBOX2)> <no-op> <executed (LIFT SBOX5)> <agreed to achieve (ON MBOX3 TRUCK1) for HTO> <executed (PUT-DOWN SBOX5)> <executed (MOVE STREET)> <executed (UNLOAD MBOX3 HANDTR2)> <executed (LOAD MBOX3 TRUCK1)>)
SUMMARIZE-TRACE reduces L1's activity to:
(<agreed to achieve (ON MBOX3 HANDTR2) for HTO> <executed (LOAD MBOX3 HANDTR2)> <agreed to achieve (ON MBOX3 TRUCK1) for HTO> <executed (LOAD MBOX3 TRUCK1)>)
L1 accomplished both agreements and the corresponding top-level goal (ON MBOX3 TRUCK1), so none of the summarization rules applied to them. Likewise, the two LOADs were left untouched by SUMMARIZE-TRACE.
The other actions in L1's execution trace were removed for varying reasons. The attempted LIFT of the large box was pruned just as any other failed operator would. (LIFT SBOX5) is omitted since it was undone by the subsequent PUT-DOWN operator, which was in turn dropped since it achieved HANDEMPTY, a lowest criticality goal. Lifting, and later unloading, MBOX3 is removed in the third pass of SUMMARIZE-TRACE since they are planner-reconstructible from the precondition (HOLDING MBOX3) of the LOAD operators following them.