ACRE Group Module

From Agent Factory

Jump to: navigation, search

Contents

Introduction

The ACRE Group Module is an ACRE component used in conjunction with the ACRE Module to allow the agent to control multiple related conversations together. It cannot be used by itself, as it relies on the ACRE Module to function. An example of this is an auctioneer agent that wishes to follow an auction protocol with several agents at once, relating to the same item. In this case, each conversation has its own separate conversation identifier, so without group reasoning, they would be considered to be entirely independent conversations. The principal advantage of using a group reasoner is that related conversations can be monitored and events triggered whenever particular situations are encountered (e.g. in an auction, all of the bidding agents have responded to the original call for proposals).

The Group Monitor deals with two different types of groups, agent groups and conversation groups.

Agent Group 
An Agent Group is a named group of agents. This is useful for categorising different types of agents with which it may become necessary to communicate in an organised way. An example of its use would be for an auctioneer to maintain a set of agents that may be interested in being notified about future auctions.
Conversation Group 
A Conversation Group is a group of related conversations (e.g. the conversations with each of the individual bidders that relate to a single auction).

The actions below relate to either Agent Groups or Conversation Groups, and are categorised accordingly.

Loading

The module is implemented in the is.lill.acre.agent.module.ACREGroupModule package, which needs to be loaded into your agent before using any of the actions below.

Actions

init 
Initialise the module so that it can be used. This must be the first action called when the module is loaded. It will require that the init method of the ACRE Module has previously been called.

Relating to Agent Groups

newAgentGroup(?group-name) 
Creates a new empty group of agents with a given group name.
newAgentGroup(?group-name,?agent-list) 
Creates a new group of agents with a given group name and an initial list of agents to be included in the group.
addAgent(?group-name,?agent-list)
Used to add an agent (or multiple agents passed as a list) to a specified group.
removeAgent(?group-name,?agent-list)
This removes an agent (or multiple agents passed as a list) from a specified group. Adding or removing agents from an agent group does not affect on any conversation groups in which they are participating.
disband(?group-name)
Deletes a group of agents from the address book. Each agent remains as an individual entry in the address book and must be removed separately if this is desired.


Relating to Conversation Groups

start(?protocol,?agent-group-name)
start(?protocol,?agent-group-name,?performative)
start(?protocol,?agent-group-name,?performative,?content)
These action is very similar to the start actions provided by the ACRE Module. They differ here in that they initiate identical conversations (with the exception of the conversation identifier) with all of the agents in an agent group. Returns an identifier through which this group of conversations may be referenced. e.g.
    ?groupid = acreGroup.start(pingpong,inform,ping,mygroup)
remove(?group-name,?cid) 
Removes the specified conversation from a group of conversations.
advanceAll(?group-name,?performative)
advanceAll(?group-name,?performative,?content) 
Very similar to the advance actions in the ACRE Module. In this case, all conversations in the specified group will be advanced using the same message details.
watch(?group-name,?description-list)
The ability to monitor groups of conversations and fire events is a key feature of ACRE's conversation management. Here, group monitors can be attached to each group of conversations so that events can be raised when, for example, all conversations in the group have reached the same state. The ?monitor-list parameter provides a list of the group monitors that are to be attached to each group. Each of these should be the class name of a Java class that implements the IGroupMonitor interface. If a package name is not provided, it is assumed that the monitor is to be loaded from the default package (namely is.lill.acre.group.monitor).
setTimeout(?group-name,?timeout) 
Set a timeout value (in seconds) that should be included in all outgoing messages sent as part of conversations that are contained in this group. Overrides any previous timeout values that may have been set in the past for individual conversations.
unwatch(?group-name,?monitor-list)
unwatch(?group-name) 
Removes monitors from this group of conversations. If no monitor list is specified, then all monitors will be removed from the group.
add(?group-name,?cid) 
Manually add a named conversation to a named conversation group.
newGroup(?group-name) 
Create a new (empty) named conversation group.
remove(?group-name,?cid) 
Remove the named conversation from the named conversation group.
annotate(?group-name,?annotation) 
Add an annotation to a conversation group. This persists until removed with one of the deannotate actions below, or until the group is removed.
deannotate(?group-name) 
Remove all annotations from a conversation group.
deannotate(?group-name,?annotation) 
Remove a specific annotation from a conversation group.

Knowledge Percepts

Relating to Agent Groups

groupMember(?agid,?aid) 
Indicates that the agent with the identifier ?aid is part of the agent group that has the identifier ?agid.

Relating to Conversation Groups

conversationGroup(?cgid,?cid) 
Indicates that a conversation identified by ?cid is part of the conversation group identified by ?gid.
groupSize(?cgid,?size) 
Indicates the number of conversations (the ?size) that are part of the conversation group identified by ?cgid.

Event Percepts

Relating to Conversation Groups

groupEvent(?cgid,monitor-name(?param1[,?param2...])) 
Indicates that a group monitor has raised an event. The ?cgid parameter is the name of the conversation group that the event relates to. The remainder of the belief depends on the monitor that was used and the parameters that were passed to it when it was created. The monitor-name in italics will be the name of the group monitor that raised the event. It is followed by the parameters that were used in setting up the group monitor initially.

As an example, suppose a group monitor was set up using the following code (assuming the ACRE Group Module was loaded under the name group):

group.watch(myGroup,AllReachedState(bid_submitted))

The event that is raised by this group monitor will be:

groupEvent(myGroup,AllReachedState(bid_submitted))