public class AutomatedAgentsCore
extends java.lang.Object
AutomatedAgent
,
AutomatedAgentType
Modifier and Type | Class and Description |
---|---|
class |
AutomatedAgentsCore.AutomatedAgentGenerateAgreement |
Modifier and Type | Field and Description |
---|---|
static int |
AGENT_TYPES_NUM |
static java.lang.String |
COMMENT_CHAR_STR |
static int |
COMPROMISE_TYPE_IDX |
static java.lang.String |
GENERAL_DATA_SEPARATOR_STR |
static int |
GENERAL_VALUES_NUM |
static java.lang.String |
ISSUE_HEADER_STR |
static java.lang.String |
ISSUE_SEPARATOR_STR |
static int |
LONG_TERM_TYPE_IDX |
static int |
OPT_OUT_IND |
static java.lang.String |
OPT_OUT_STR |
static int |
SHORT_TERM_TYPE_IDX |
static int |
STATUS_QUO_IND |
static java.lang.String |
STATUS_QUO_STR |
static int |
TIME_EFFECT_IND |
static java.lang.String |
TIME_EFFECT_STR |
static java.lang.String |
VALUES_NAMES_SEPARATOR_STR |
static java.lang.String |
VALUES_UTILITY_SEPARATOR_STR |
Constructor and Description |
---|
AutomatedAgentsCore(java.lang.String sFileName,
java.lang.String sNow,
AgentTools agentTools,
AbstractAutomatedAgent abstractAgent)
Initializes the agent's core.
|
Modifier and Type | Method and Description |
---|---|
void |
calculateAgreement(AutomatedAgentType agentType,
int nCurrentTurn)
Calculate agreement to send for the opponent for a given agent and a given turn
|
void |
calculateNextTurnAgreement(AutomatedAgentType agentType,
int nNextTurn)
Calculate agreement for a given agent for the following turn
|
java.lang.String |
getAutomatedAgentAgreement()
Return the agreement the automated agent selected to offer
|
double |
getCurrentTurnAutomatedAgentValue() |
java.lang.String |
getNextTurnAutomatedAgentAgreement()
Return the agreement the automated agent selected to offer based on next turn values
|
double |
getNextTurnAutomatedAgentUtilityValue()
Return the agreement the automated agent selected to offer based on next turn values
|
double |
getNextTurnAutomatedAgentValue() |
double |
getNextTurnOpponentAutomatedAgentUtilityValue()
Return the opponnet's value in the next turn for the agreement the automated agent selected
|
AutomatedAgentType |
getNextTurnOpponentType()
Return the type of the opponent
|
AutomatedAgentType |
getSideACompromiseNextTurnType() |
AutomatedAgentType |
getSideACompromiseType() |
AutomatedAgentType |
getSideALongTermNextTurnType() |
AutomatedAgentType |
getSideALongTermType() |
AutomatedAgentType |
getSideAShortTermNextTurnType() |
AutomatedAgentType |
getSideAShortTermType() |
AutomatedAgentType |
getSideBCompromiseNextTurnType() |
AutomatedAgentType |
getSideBCompromiseType() |
AutomatedAgentType |
getSideBLongTermNextTurnType() |
AutomatedAgentType |
getSideBLongTermType() |
AutomatedAgentType |
getSideBShortTermNextTurnType() |
AutomatedAgentType |
getSideBShortTermType() |
void |
initGenerateAgreement(AutomatedAgentType agentType)
Initialize the GenerateAgreement classs by a given agent
|
java.lang.String |
readUtilityDetails(java.io.BufferedReader br,
java.lang.String line,
java.util.ArrayList<UtilityDetails> lstUtilityDetails,
double[] dGeneralValues)
Read the utility details from the agent's file
|
void |
setAbstractAgent(AbstractAutomatedAgent abstractAgent) |
void |
setAgentTools(AgentTools agentTools) |
void |
setCurrentTurnAgreementString(java.lang.String agreementStr) |
void |
setCurrentTurnAutomatedAgentValue(double agreementValue) |
void |
setCurrentTurnOpponentSelectedValue(double agreementValue) |
void |
setNextTurnAgreementString(java.lang.String agreementStr) |
void |
setNextTurnAutomatedAgentSelectedValue(double agreementValue) |
void |
setNextTurnAutomatedAgentValue(double agreementValue) |
void |
setNextTurnOpponentSelectedValue(double agreementValue) |
void |
setNextTurnOpponentType(int type) |
void |
updateAgreementsValues(int nTimePeriod)
Update the agreement values based on a given turn
|
public static final java.lang.String COMMENT_CHAR_STR
public static final java.lang.String ISSUE_HEADER_STR
public static final java.lang.String ISSUE_SEPARATOR_STR
public static final java.lang.String VALUES_UTILITY_SEPARATOR_STR
public static final java.lang.String VALUES_NAMES_SEPARATOR_STR
public static final java.lang.String GENERAL_DATA_SEPARATOR_STR
public static final java.lang.String TIME_EFFECT_STR
public static final java.lang.String OPT_OUT_STR
public static final java.lang.String STATUS_QUO_STR
public static final int TIME_EFFECT_IND
public static final int OPT_OUT_IND
public static final int STATUS_QUO_IND
public static final int GENERAL_VALUES_NUM
public static final int LONG_TERM_TYPE_IDX
public static final int SHORT_TERM_TYPE_IDX
public static final int COMPROMISE_TYPE_IDX
public static final int AGENT_TYPES_NUM
public AutomatedAgentsCore(java.lang.String sFileName, java.lang.String sNow, AgentTools agentTools, AbstractAutomatedAgent abstractAgent)
public AutomatedAgentType getSideALongTermType()
public AutomatedAgentType getSideAShortTermType()
public AutomatedAgentType getSideACompromiseType()
public AutomatedAgentType getSideBLongTermType()
public AutomatedAgentType getSideBShortTermType()
public AutomatedAgentType getSideBCompromiseType()
public AutomatedAgentType getSideALongTermNextTurnType()
public AutomatedAgentType getSideAShortTermNextTurnType()
public AutomatedAgentType getSideACompromiseNextTurnType()
public AutomatedAgentType getSideBLongTermNextTurnType()
public AutomatedAgentType getSideBShortTermNextTurnType()
public AutomatedAgentType getSideBCompromiseNextTurnType()
public java.lang.String readUtilityDetails(java.io.BufferedReader br, java.lang.String line, java.util.ArrayList<UtilityDetails> lstUtilityDetails, double[] dGeneralValues)
br
- - the reader of the fileline
- - the read linelstUtilityDetails
- - list of the utility detailsdGeneralValues
- - array of the general valuespublic void updateAgreementsValues(int nTimePeriod)
ntimePeriod
- - the specific turnpublic void initGenerateAgreement(AutomatedAgentType agentType)
agentType
- - the given agentpublic void calculateAgreement(AutomatedAgentType agentType, int nCurrentTurn)
agentType
- - the given agentnCurrentTurn
- - the current turnpublic java.lang.String getAutomatedAgentAgreement()
public void calculateNextTurnAgreement(AutomatedAgentType agentType, int nNextTurn)
agentType
- - the given agentnNextTurn
- - the next turnpublic double getNextTurnAutomatedAgentUtilityValue()
public java.lang.String getNextTurnAutomatedAgentAgreement()
public double getNextTurnOpponentAutomatedAgentUtilityValue()
public AutomatedAgentType getNextTurnOpponentType()
public void setAgentTools(AgentTools agentTools)
public void setAbstractAgent(AbstractAutomatedAgent abstractAgent)
public double getNextTurnAutomatedAgentValue()
public double getCurrentTurnAutomatedAgentValue()
public void setNextTurnAutomatedAgentValue(double agreementValue)
public void setCurrentTurnAutomatedAgentValue(double agreementValue)
public void setNextTurnAutomatedAgentSelectedValue(double agreementValue)
public void setNextTurnOpponentSelectedValue(double agreementValue)
public void setCurrentTurnOpponentSelectedValue(double agreementValue)
public void setNextTurnAgreementString(java.lang.String agreementStr)
public void setCurrentTurnAgreementString(java.lang.String agreementStr)
public void setNextTurnOpponentType(int type)