Commitment
From Agent Factory
Contents |
Overview
Commitments represent the decisions that an agent makes about what to do. Broadly speaking, a commitment can be viewed as an agreement that is made by an agent to do something. In other words, a commitment is the mental equivalent of a contract. As such, it specifies the course of action that the agent has agreed to, to whom this agreement has been made, when it must be fulfilled, and under what conditions the agreed course of action becomes invalid (i.e. under what conditions the contract can be breached).
Practically speaking, a commitment combines:
- an agent identifier: the agent to whom the commitment was made (possibly itself)
- a time: after which the agent should try to realise the activity that it has committed to
- some condition: under which the commitment must be maintained (i.e. if the condition becomes false, then the commitment is dropped)
- the activity: this is the agreed course of action, and may take one of two forms:
- Directly executable actions: these can be modeled through a unique identifier, known as an action identifier, that is associated with one of the agent’s actions.
- Plans of action. These can be modeled either through the direct encoding of the Plan, or through the association of a unique identifier with each Plan the agent knows.
In addition to these four bits of information, commitments also have a state that represents the stage that the commitment has reached in its lifecycle.
Commitment Adoption
Commitments may be adopted as a result of one of four scenarios arising:
- Initial Commitments: The commitment is explicitly declared in the AFAPL2 code;
- Commitment Rule Firing: The commitment is adopted as a result of some Commitment Rule being fired;
- Goal Achievement: The commitment is adopted in an effort to achieve some Goal; or
- Commitment Refinement: The commitment is adopted as a result of the refinement of some existing commitment (part of Commitment Management).
Any commitment that is adopted as a result of one of the first three scenarios is known as a Primary Commitment. Conversely, any commitment that is adopted as a result of the fourth scenario is known as a Secondary Commitment. The result of secondary commitments is the existence of a hierarchical relationship between commitments that results in something known as a Commitment Structure.
Commitment States
As is highlighted in the figure below, a commitment can enter into one of a number of potential states. That said, whenever a commitment is created, it begins in an INITIAL state. How the state evolves depends upon a range of factors that are tied together under the notion of Commitment Management, but ultimately, the commitment will enter into one of two possible states: SUCCEEDED or FAILED. After the commitment reaches this state, the commitment is removed from the agents commitment set.
Defining an Initial Commitment in AFAPL2
To declare an initial commitment, you should use something like this:
COMMIT(?self, ?now, BELIEF(true), helloWorld);
This initial commitment is to perform the helloWorld Action, and is a personal commitment that should be executed immediately (or at least, as soon as possible). The maintenance condition is such that there is not situation in which the commitment may be dropped (i.e. the commitment will exist until the agent attempts the action).
References
Rao, A. and Georgeff, M. (1991), Modeling Rational Agents within a BDI-Architecture, in Proceedings of the 2nd International Conference on Principles of Knowledge Representation and Reasoning (KR'91). Cambridge, MA, USA, April 22-25, 1991. Morgan Kaufmann Publishers, 1991, ISBN 1-55860-165-1
