Plan
From Agent Factory
[edit]
Editorial History
13/01/2009 (Version 1): Initial Version of Page
[edit]
Overview
T.B.C.
[edit]
Current Plan Operators
- SEQ(X, Y): Specifies a sequence of activities that should be performed sequentially by the agent. Here X should be performed successfully before Y can be performed. The plan is considered to be completed when Y is successfully performed.
- PAR(X, y): Specifies a sequence of activities that should be performed in parallel by the agent. Here, X and Y should be performed at the same time (the order does not matter). The plan is completed when both X and Y have been performed successfully.
- OR(X, Y): Specifies a sequence of activities, one of which should be performed. OR is a non-deterministic choice operator, and is very similar to PAR, with the exception that it is considered complete when one of the sub-activities is completed successfully (e.g. the plan is complete when either X or Y completes).
- XOR(X, Y): A variation of OR in which only one of the operations is performed. That is, the agent will try to perform X. If X fails, it will then try to perform Y. If Y fails, then the plan has failed. [NOTE: This plan operator is a little outdated - in reality, it needs to be refactored so that, once one of the sub-activities is started, all other actions are suspended until the outcome of that sub-activity is known].
- FOREACH(C, X): Here, an activity, X, is performed for each variable binding that matches the specified condition, C. This operator is evaluated immediately. If no variable bindings exist for C, then the operator is completed. If a variable binding exists, then a corresponding commitment is adopted for each variable binding. The operator is completed when all of these commitments are successfully performed.
- DO_WHEN(C, X): Do activity X when condition C arises. This operator waits for C to become true (i.e. the agent will be bindly committed to the corresponding commitment). When C does become true, the associated variable bindings are used to create a corresponding set of commitments.
- AWAIT(C): Wait for C to become true.
- DELAY(T): Delay for T iterations.
- ATTEMPT(X, P, F): Attempt to perform activity X. If X succeeds, then perform P, conversely, if X fails, perform F.
