public abstract class SouthamptonAgent extends Agent
Modifier and Type | Field and Description |
---|---|
protected double |
acceptMultiplier |
protected BidSpace |
bidSpace
Our BidSpace.
|
protected static double |
MAXIMUM_ASPIRATION
Our maximum aspiration level.
|
protected Action |
myLastAction
My previous action.
|
protected Bid |
myLastBid
My previous bid.
|
protected java.util.ArrayList<Bid> |
myPreviousBids
A list of our previous bids.
|
protected java.util.ArrayList<Bid> |
opponentBids
The bids made by the opponent.
|
protected boolean |
opponentIsHardHead |
protected OpponentModel |
opponentModel
Our model of the opponent.
|
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.
|
protected void |
finalize() |
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(java.lang.String message)
Output a message, but only if debugging is turned on.
|
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
|
endSession, getAgentID, getName, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getSupportedNegotiationSetting, getUniqueIdentifier, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleep
protected static double MAXIMUM_ASPIRATION
protected BidSpace bidSpace
protected Action myLastAction
protected Bid myLastBid
protected java.util.ArrayList<Bid> myPreviousBids
protected java.util.ArrayList<Bid> opponentBids
protected OpponentModel opponentModel
protected Bid opponentPreviousBid
protected final double acceptMultiplier
protected boolean opponentIsHardHead
public java.lang.String getVersion()
getVersion
in class Agent
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public final Action chooseAction()
Agent
chooseAction
in class Agent
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.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)
Agent
ReceiveMessage
in class Agent