Download Norm Recognition in Multi
Transcript
Figure 5: an example of our plan-library With the completion of initPlan, PlanRecognizer waits (on a semaphore). ObservationTower has the duty to reactivate it every waitThreshold/3 or if the actor reaches its nal destination. When PlanRecognizer wakes up, it checks the number of moves performed by the actor, which is provided by the ObservationTower, and records the agent's current position (its position when ObservationTower activated it). At this point if the number of moves is greater than or equal to plan-library levels, extendPlan is called. This method simply extends the library by 3 levels. Having done all of this, the thread scans the list of the PlanLibNodes at level l, where l 10 : if is equal to the recorded number of moves one or more nodes are named with the same number as the current position, it is tagged with t. A value t is equal to 1 at the rst iteration and is incremented by one every time ObservationTower activates its PlanRecognizer. The tag in the system intuitively represents the temporal information as shown in [11]. If t is 1, then possible plans are built by nding (and reversing) all the paths from the tagged nodes to the root. Otherwise, the method propagateUp is called, which checks temporal consistency in a similar manner to that described 10 Note that if we couldn't use the recorded number of moves information, the number of possible plans would have been much larger: this simplication reduces the diculty in adapting the SPR approach to our environment. 21