es.upv.dsic.gti_ia.cAgents.protocols
Class Argumentation_Participant

java.lang.Object
  extended by es.upv.dsic.gti_ia.cAgents.protocols.Argumentation_Participant

public abstract class Argumentation_Participant
extends Object

Abstract class that defines the argumentation participant protocol to be followed by the CAgents.

Author:
Jaume Jordan

Constructor Summary
Argumentation_Participant()
           
 
Method Summary
protected abstract  void doAccept(CProcessor myProcessor, ACLMessage msgToSend)
          Actions to perform and send an ACLMessage accepting the other agent's position or argument
protected abstract  String doAssert(CProcessor myProcessor, ACLMessage msg, String whyAgentID)
          Try to assert a support argument to respond to the WHY received previously.
protected abstract  boolean doAttack(CProcessor myProcessor, ACLMessage msgToSend, ACLMessage msgReceived, boolean defending)
          Actions to perform to generate an attack argument against an attack or assert received
protected  void doBegin(CProcessor myProcessor, ACLMessage msg)
          Begin method executed to begin the conversation
protected abstract  void doDie(CProcessor myProcessor)
          Actions to perform when the message with locution DIE is received.
protected abstract  boolean doEnterDialogue(CProcessor myProcessor, ACLMessage msg)
          Evaluates if the agent can enter in the dialogue offering a solution.
protected abstract  void doFinishDialogue(CProcessor myProcessor, ACLMessage msg)
          Actions to be executed when the dialogue has to finish
protected abstract  void doGetPositions(CProcessor myProcessor, ACLMessage msgReceived)
          Get the positions of the agents in the dialogue sent by the Commitment Store as an object in the ACLMessage parameter
protected abstract  void doMyPositionAccepted(CProcessor myProcessor, ACLMessage messageReceived)
          Actions to perform when the position of the agent has been accepted.
protected abstract  void doNoCommit(CProcessor myProcessor, ACLMessage msg)
          Creates an ACLMessage to send with the locution NOCOMMIT
protected abstract  void doOpenDialogue(CProcessor myProcessor, ACLMessage msg)
          Takes the domain-case to solve and the dialogue ID from the ACLMessage given
protected abstract  boolean doPropose(CProcessor myProcessor, ACLMessage msg)
          Proposes a Position to defend in the dialogue.
protected abstract  void doQueryPositions(CProcessor myProcessor, ACLMessage msg)
          Creates a message to send to the Commitment Store with locution GETALLPOSITIONS to obtain all the positions of the dialogue
protected abstract  void doSendPosition(CProcessor myProcessor, ACLMessage msg)
          Sends an ACLMessage with the Position defended by the agent
protected abstract  void doSolution(CProcessor myProcessor, ACLMessage msg)
          Actions to perform when the final solution to the current problem to solve arrives in an ACLMessage
protected abstract  boolean doWhy(CProcessor myProcessor, ACLMessage msg)
          Choose a Position to send a WHY message if it can, or NOTHING
 CFactory newFactory(String name, int availableConversations, CAgent myAgent, long stdTimeout, long randTimeout)
          Creates a new argumentation participant CFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Argumentation_Participant

public Argumentation_Participant()
Method Detail

doBegin

protected void doBegin(CProcessor myProcessor,
                       ACLMessage msg)
Begin method executed to begin the conversation

Parameters:
myProcessor - CProcessor that manage the conversation
msg - initial message

doOpenDialogue

protected abstract void doOpenDialogue(CProcessor myProcessor,
                                       ACLMessage msg)
Takes the domain-case to solve and the dialogue ID from the ACLMessage given

Parameters:
myProcessor - CProcessor that manage the conversation
msg - ACLMessage with the domain-case to solve and the dialogue ID

doEnterDialogue

protected abstract boolean doEnterDialogue(CProcessor myProcessor,
                                           ACLMessage msg)
Evaluates if the agent can enter in the dialogue offering a solution. If it can not, it does a withdraw dialogue.

Parameters:
myProcessor - CProcessor that manage the conversation
msg - ACLMessage to send to Commitment Store, with locution ENTERDIALOGUE or WITHDRAWDIALOGUE
Returns:
true if it makes an ENTERDIALOGUE, false if it makes a WITHDRAWDIALOGUE

doPropose

protected abstract boolean doPropose(CProcessor myProcessor,
                                     ACLMessage msg)
Proposes a Position to defend in the dialogue. If it can not, it does a withdraw dialogue.

Parameters:
myProcessor - CProcessor that manage the conversation
msg - ACLMessage to send with the Position to propose (ADDPOSITION) or WITHDRAWDIALOGUE
Returns:
true if it makes an ADDPOSITION, false if it makes a WITHDRAWDIALOGUE

doFinishDialogue

protected abstract void doFinishDialogue(CProcessor myProcessor,
                                         ACLMessage msg)
Actions to be executed when the dialogue has to finish

Parameters:
myProcessor - CProcessor that manage the conversation
msg - ACLMessage received with the locution FINISHDIALOGUE

doMyPositionAccepted

protected abstract void doMyPositionAccepted(CProcessor myProcessor,
                                             ACLMessage messageReceived)
Actions to perform when the position of the agent has been accepted.

Parameters:
myProcessor - CProcessor that manage the conversation
messageReceived - ACLMessage with the locution ACCEPT

doSendPosition

protected abstract void doSendPosition(CProcessor myProcessor,
                                       ACLMessage msg)
Sends an ACLMessage with the Position defended by the agent

Parameters:
myProcessor - CProcessor that manage the conversation
msg - an ACLMessage to send with the Position defended by the agent

doSolution

protected abstract void doSolution(CProcessor myProcessor,
                                   ACLMessage msg)
Actions to perform when the final solution to the current problem to solve arrives in an ACLMessage

Parameters:
myProcessor - CProcessor that manage the conversation
msg - an ACLMessage received with the solution to the current problem

doAssert

protected abstract String doAssert(CProcessor myProcessor,
                                   ACLMessage msg,
                                   String whyAgentID)
Try to assert a support argument to respond to the WHY received previously.

Parameters:
myProcessor - CProcessor that manage the conversation
msg - an ACLMessage to send with an Argument and locution ASSERT, a locution NOCOMMIT, or a locution NOTHING
whyAgentID - agent identifier that has made the WHY
Returns:
A String describing if it makes an ASSERT, NOCOMMIT or, WAIT_CENTRAL

doAttack

protected abstract boolean doAttack(CProcessor myProcessor,
                                    ACLMessage msgToSend,
                                    ACLMessage msgReceived,
                                    boolean defending)
Actions to perform to generate an attack argument against an attack or assert received

Parameters:
myProcessor - CProcessor that manage the conversation
msgToSend - ACLMessage to send with the attack argument or a NOCOMMIT
msgReceived - ACLMessage received with an attack or assert
defending - indicates if it is defending its position or attacking another agent position
Returns:
true if an attack argument has been generated

doNoCommit

protected abstract void doNoCommit(CProcessor myProcessor,
                                   ACLMessage msg)
Creates an ACLMessage to send with the locution NOCOMMIT

Parameters:
myProcessor - CProcessor that manage the conversation
msg - ACLMessage to send with the locution NOCOMMIT

doQueryPositions

protected abstract void doQueryPositions(CProcessor myProcessor,
                                         ACLMessage msg)
Creates a message to send to the Commitment Store with locution GETALLPOSITIONS to obtain all the positions of the dialogue

Parameters:
myProcessor - CProcessor that manage the conversation
msg - ACLMessage to send to the Commitment Store with locution GETALLPOSITIONS

doGetPositions

protected abstract void doGetPositions(CProcessor myProcessor,
                                       ACLMessage msgReceived)
Get the positions of the agents in the dialogue sent by the Commitment Store as an object in the ACLMessage parameter

Parameters:
myProcessor - CProcessor that manage the conversation
msg - ACLMessage with locution GETALLPOSITIONS and the positions of other agents in the dialogue

doWhy

protected abstract boolean doWhy(CProcessor myProcessor,
                                 ACLMessage msg)
Choose a Position to send a WHY message if it can, or NOTHING

Parameters:
myProcessor - CProcessor that manage the conversation
msg - ACLMessage to send a WHY, or NOTHING if there is not any Position to ask
Returns:
code>true if it makes a WHY, false if it makes a NOTHING

doAccept

protected abstract void doAccept(CProcessor myProcessor,
                                 ACLMessage msgToSend)
Actions to perform and send an ACLMessage accepting the other agent's position or argument

Parameters:
myProcessor - CProcessor that manage the conversation
msgToSend - ACLMessage accepting the other agent's position or argument

doDie

protected abstract void doDie(CProcessor myProcessor)
Actions to perform when the message with locution DIE is received.

Parameters:
myProcessor - CProcessor that manage the conversation

newFactory

public CFactory newFactory(String name,
                           int availableConversations,
                           CAgent myAgent,
                           long stdTimeout,
                           long randTimeout)
Creates a new argumentation participant CFactory

Parameters:
name - factory's name
availableConversations - maximum number of conversation this CFactory can manage simultaneously
myAgent - agent owner of this CFactory
stdTimeout - standard timeout to wait in wait states
randTimeout - random timeout to wait in some states of the dialogue
Returns:
a new argumentation participant factory


Copyright © 2012 GTI-IA. All Rights Reserved.