Commitment Rule

From Agent Factory

Jump to: navigation, search

Editorial History

28/12/2008 (Version 1): Initial version of Page

Overview

Commitment Rules are the primary mechanism by which agents adopt new Commitments. Broadly speaking, they define situations (some form of Belief sentence) in which the agent should commit to a course of action.

Thus, the behaviour of an AFAPL2 agent is encoded as a set of Commitment Rules that conditions in which the agent should act. In AFAPL2, a Commitment Rule has the following syntax:

<belief-sentence> => <commitment>;

These rules are checked during each iteration of the AFAPL2 interpreter execution cycle. This is done by querying the current beliefs of the agent, and generating the set of all possible variable bindings that result in the left-hand size of the Commitment Rule being evaluated as true. These variable bindings are then applied to the Commitment on the right-hand side of the Commitment Rule and each resulting Commitment is adopted by the agent.

For example, the following rule specifies a behaviour in which the agent would send a chatter inform message to every agent that it believes that it want to send one to.

BELIEF(wantToChat(?name, ?addr)) =>
COMMIT(?self, ?now, BELIEF(true),
    inform(agentID(?name, ?addr), chatter)
);