public abstract class SouthamptonAgent extends VersionIndependentAgent
Modifier and Type | Field and Description |
---|---|
protected double |
acceptMultiplier |
protected boolean |
debug |
protected double |
MAXIMUM_ASPIRATION
Our maximum aspiration level.
|
protected Action |
myLastAction
My previous action.
|
protected Bid |
myLastBid
My previous bid.
|
protected Bid |
opponentPreviousBid
The opponent's previous bid.
|
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace
Constructor and Description |
---|
SouthamptonAgent() |
Modifier and Type | Method and Description |
---|---|
Action |
chooseAction()
this function is called after ReceiveMessage, with an Offer-action.
|
Action |
chooseAction(long ourTime,
long opponentTime) |
protected void |
finalize() |
void |
flushLog()
Output a message, but only if debugging is turned on.
|
int |
getAgentNo()
Get the number of the agent.
|
protected Bid |
getRandomBidInRange(double lowerBound,
double upperBound)
Get a random bid in a given utility range.
|
java.lang.String |
getVersion()
Gets the version number.
|
void |
init()
This method is called by the protocol every time before starting a new
session after the internalInit method is called.
|
void |
log(Jama.Matrix matrix)
Output a matrix, but only if debugging is turned on.
|
void |
log(java.lang.String message)
Output a message, but only if debugging is turned on.
|
void |
logError(java.lang.String message)
Output a message, but only if debugging is turned on.
|
void |
OfferReceived(Offer opponentAction) |
protected abstract Bid |
proposeInitialBid()
Propose the initial bid.
|
protected abstract Bid |
proposeNextBid(Bid opponentBid)
Propose the next bid.
|
void |
ReceiveMessage(Action opponentAction)
informs you which action the opponent did
|
void |
ReceiveMessage(Action opponentAction,
long ourTime,
long opponentTime) |
adjustDiscountFactor, getTime, setOpponentTime, setOurTime
endSession, getAgentID, getName, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getSupportedNegotiationSetting, getUniqueIdentifier, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleep
protected double MAXIMUM_ASPIRATION
protected Action myLastAction
protected Bid myLastBid
protected Bid opponentPreviousBid
protected double acceptMultiplier
protected boolean debug
public java.lang.String getVersion()
getVersion
in class Agent
public final Action chooseAction(long ourTime, long opponentTime)
public final Action chooseAction()
Agent
chooseAction
in class Agent
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public int getAgentNo()
protected Bid getRandomBidInRange(double lowerBound, double upperBound) throws java.lang.Exception
lowerBound
- The lower bound on utility.upperBound
- The upper bound on utility.java.lang.Exception
public void init()
Agent
public final void log(java.lang.String message)
message
- The message to output.public final void logError(java.lang.String message)
message
- The message to output.public final void flushLog()
message
- The message to output.public final void log(Jama.Matrix matrix)
matrix
- The matrix to output.protected abstract Bid proposeInitialBid() throws java.lang.Exception
java.lang.Exception
protected abstract Bid proposeNextBid(Bid opponentBid) throws java.lang.Exception
opponentBid
- The bid that has just been made by the opponent.java.lang.Exception
public final void ReceiveMessage(Action opponentAction, long ourTime, long opponentTime)
public final void ReceiveMessage(Action opponentAction)
Agent
ReceiveMessage
in class Agent
public void OfferReceived(Offer opponentAction)