public class NiceTitForTat extends BilateralAgent
domain, myHistory, opponentHistory
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace
Constructor and Description |
---|
NiceTitForTat() |
Modifier and Type | Method and Description |
---|---|
Bid |
chooseCounterBid()
The opponent has already made a bid.
|
Bid |
chooseFirstCounterBid()
Use this method to make the first counter-bid.
|
Bid |
chooseOpeningBid()
Use this method to make an opening bid.
|
java.lang.String |
getName() |
SupportedNegotiationSetting |
getSupportedNegotiationSetting()
Indicates what negotiation settings are supported by an agent, such as
linear or non-linear utility spaces.
|
java.lang.String |
getVersion() |
void |
init()
This method is called by the protocol every time before starting a new
session after the internalInit method is called.
|
boolean |
isAcceptable(Bid plannedBid)
At some point, one of the parties has to accept an offer to end the
negotiation.
|
protected static void |
log(java.lang.String s) |
protected Action |
makeAcceptAction()
By default, if an offer is deemed acceptable, we send accept.
|
static double |
percentage(double x) |
protected void |
prepareOpponentModel() |
static double |
round2(double x)
Rounds to two decimals
|
static double |
round3(double x)
Rounds to 3 decimals
|
chooseAction, getMyLastBid, getMySecondLastBid, getOpponentHistory, getOpponentLastBid, getRound, getUndiscountedUtility, ReceiveMessage
endSession, getAgentID, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getUniqueIdentifier, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleep
public java.lang.String getName()
public java.lang.String getVersion()
getVersion
in class BilateralAgent
public void init()
Agent
init
in class BilateralAgent
protected void prepareOpponentModel()
public Bid chooseCounterBid()
BilateralAgent
chooseCounterBid
in class BilateralAgent
public Bid chooseOpeningBid()
BilateralAgent
chooseOpeningBid
in class BilateralAgent
public Bid chooseFirstCounterBid()
BilateralAgent
chooseFirstCounterBid
in class BilateralAgent
public boolean isAcceptable(Bid plannedBid)
BilateralAgent
isAcceptable
in class BilateralAgent
protected Action makeAcceptAction()
BilateralAgent
makeAcceptAction
in class BilateralAgent
protected static void log(java.lang.String s)
public static double round2(double x)
public static double round3(double x)
public static double percentage(double x)
public SupportedNegotiationSetting getSupportedNegotiationSetting()
Agent
getSupportedNegotiationSetting
in class Agent