A Plan represents an intention to do something, in order to accomplish a particular task. "Something" may be doing a task itself, applying a particular decomposition to a task, or trying to fulfill a step of a decomposition; each of these cases are represented by concrete subclasses of Plan.
Most plans are in service of some larger plan, which is called the parent. A plan with no parent is referred to as a "top-level" plan. A plan together with its parents and children form a data structure called a plan tree, which represents all the past and future intentions to accomplish some top-level goal.
A plan may be in several different states which specify whether or not the goal is, was, or may in the future be achieved:
- startable
- this plan could be begun now (whether or now it has been begun)
- started
- the agent has begun trying to carry out this plan (and may or may not have finished)
- done
- the plan has been successfully carried out
- failed
- the plan has not been succesfully achieved, and the agent has given up trying
- live
- the plan can be worked on; it has been or could be started, and has not failed or succeeded
A note on "failed" -- in this framework, failure is expected to be permanent; the agent has given up on carrying out this particular plan. Phenomena like retrying a failed task (possibly with a different decomposition) are handled by adding a new sub-plan to the parent plan.
An elaboration is a possible addition to a plan tree; that is, an intention that an agent is considering but has not yet decided to adopt or reject. Elaborations are also represented by the Plan class and its subclasses; an elaboration references its parent plan but does not appear in the parent's list of children (see {@link #isElaboration()} and {@link #attach()}). Note that an elaboration is not necessary just a single Plan object; it may consist of an entire subtree.
@author Dan Schulman
@version $Id: Plan.java 458 2009-06-05 20:08:52Z schulman $