-
Notifications
You must be signed in to change notification settings - Fork 98
UsingFIPAACL
GAMA allows modelers to provide agents the capability to communicate with other agents using FIPA Communication Acts (such as inform, request, call for proposal...) and Interaction Protocols (such Contract Net Interaction Protocol, Request Interaction Protocol).
To add these capabilities to the chosen species, the modeler needs to attach the fipa skill: it adds to agents of the species some additional attributes (e.g. the list of messages received) and available actions (e.g. the possibility to send messages given the chosen Communication Act).
The exhaustive list of available Communication Acts and Interaction Protocols is available from the technical description of the fipa skill page.
Examples can be found in the model library bundled with GAMA (Plugin models / FIPA Skill).
- Attach to the agents' species that need to use Communication Acts the skill
fipa - An initiator agent starts a conversation with some agents: it chooses the Interaction Protocol and starts it by sending the first Communication Acts of the protocol
- Each agent involved in the conversation needs to check its received messages and respond to them by choosing the appropriate Communication Act.
To attach the fipa skill to a species, the modeler has to add it in the skills facet of the species statement (in a way similar to any other skill).
species any_species skills: [fipa] {
...
}
Agents of any species can communicate in the same conversation. The only constraint is that they need to have the capabilities to receive and send messages, i.e. to have the skill fipa.
Species can have several attached skills: a single species can be provided with both the moving and fipa skills (and any other ones).
This skill adds to every agents of the species:
- some additional attributes (e.g.
conversationsis the list of the agent's current conversations,messagesis the list of messages of all types of performatives, andrequests,informs,proposes... are respectively the list of the 'request', 'inform', 'propose' performative messages). - some additional actions, such as:
-
inform,accept_proposal... that replies a message with an 'inform' (respectively 'accept_proposal' performative message). -
start_conversationthat starts a conversation with a chosen interaction protocol. -
end_conversationthat replies a message with an 'end_conversation' performative message. This message marks the end of a conversation. In a 'no-protocol' conversation, it is the responsibility of the modeler to explicitly send this message to mark the end of a conversation/interaction protocol. -
replythat replies a message. This action should be only used to reply a message in a 'no-protocol' conversation and with a 'user-defined performative'. For performatives supported by GAMA, please use the 'action' with the same name as the 'performative'. For example, to reply a message with a 'request' performative message, the modeler should use the 'request' action.
-
An interaction using an Interaction Protocol starts with the creation of a conversation by an agent, using the start_conversation action.
The modeler specifies the chosen protocol (facet protocol), list of participants (facet to), communication act (facet performative) and the message (facet contents).
species Initiator skills: [fipa] {
reflex send_propose_message when: (time = 1) {
do start_conversation to: [p] protocol: 'fipa-propose' performative: 'propose' contents: ['Go swimming?'] ;
}
// TODO
// TODO
- Installation and Launching
- Workspace, Projects and Models
- Editing Models
- Running Experiments
- Running Headless
- Preferences
- Troubleshooting
- Introduction
- Manipulate basic Species
- Global Species
- Defining Advanced Species
- Defining GUI Experiment
- Exploring Models
- Optimizing Model Section
- Multi-Paradigm Modeling
- Manipulate OSM Data
- Diffusion
- Using Database
- Using FIPA ACL
- Using BDI with BEN
- Using Driving Skill
- Manipulate dates
- Manipulate lights
- Using comodel
- Save and restore Simulations
- Using network
- Headless mode
- Using Headless
- Writing Unit Tests
- Ensure model's reproducibility
- Going further with extensions
- Built-in Species
- Built-in Skills
- Built-in Architecture
- Statements
- Data Type
- File Type
- Expressions
- Exhaustive list of GAMA Keywords
- Installing the GIT version
- Developing Extensions
- Introduction to GAMA Java API
- Using GAMA flags
- Creating a release of GAMA
- Documentation generation