Please note that this page is under construction. Also, CTAPL is currently in Beta development. For more information on CTAPL, please contact Bart Kamphorst or Arlette van Wissen.
CTAPL is designed to bring well-defined BDI structures into the Colored Trails (CT) project. This is done by allowing BDI agents, written in the practical agent programming language 2APL, to communicate with a CT environment. The advantage of CTAPL is that agents can qualitatively reason in terms of beliefs, goals and plans.
CTAPL can be downloaded from svn. Use
- Bart Kamphorst, Arlette van Wissen, Virginia Dignum. Incorporating BDI agents into human-agent decision making research. The 10th Annual International Workshop "Engineering Societies in the Agents' World" (ESAW 2009).
CTAPL is a form of middleware. Through a 2APL external environment, communication between 2APL and Colored trails is proxied. No Colored Trails core code is altered, so in principle any CT configuration file may be loaded and any CT game can be played by 2APL BDI agents. CTAPL consists of four components:
- a 2APL external environment
- a MessageListener class
- a hook in Colored Trails in the form of a generic Java CT agent (GenericAgentImpl)
- 2APL communication code that 2APL agents have to use in order to communicate with the CT framework.
The relation between the different components is demonstrated in the flowchart below. In the upcoming section the components will be discussed in more detail.
The 2APL framework allows for external environments. External environments provide an interface to the Java programming language. By using the 2APL external environment Java API, it is possible to define external actions that 2APL agents can perform. An example:
In the 2APL agent this external action can be invoked with the following syntax:
Please note that the 2APL platform always sends along the name of the agent performing the external environment. This is why the call to getOpponentPin() takes no arguments within the 2APL syntax, but the actual method takes String agentname as input. This argument is necessary for all external actions in the external environment and should always be the first argument (there can be more than one input argument though).
It is also possible for the external environment to generate events that are passed to the agents. This construct is used by the MessageListener class (see below for more information).
The external environment is to be found in
It extends the apapl.Environment class.
The MessageListener class can be found here:
CTAPL uses a generic CT agent as a hook to communicate with the CT server. This class is located here:
To add specific functionality to the agent, it is recommended to add new methods to GenericAgentImplExtension.java. This class extends GenericAgentImpl.java and it is this class that is actually instantiated by the external environment.
The 2APL communication code holds all methods that 2APL agents need to communicate with the CT framework. The 2APL BDI code is located here:
You can include the general BDI code with the following import statement:
To compile CTAPL, navigate to the root directory of CTAPL and run ant:
This command will compile both the ct3 binary as the 2APL external environment. The ant build file can be found in the root directory of CTAPL and is called build.xml.
In order to run CTAPL, follow these instructions:
- Start the 2APL framework
- Select the non-Jade radiobutton
- Make sure that the IP address points to localhost and click on 'OK'
- Start the CT server
- Start any CT clients or other CT agents
- Open the .mas agent specification file within the 2APL platform (this will load the 2APL agents that will interact with the CT server)
- Load the CT configuration file (either manually or by using the controller)
- Hit the 'Play' button in the 2APL GUI to start the agents