public class BidTable
extends java.lang.Object
Constructor and Description |
---|
BidTable(Agent a,
UtilitySpace us,
double mbu,
OpponentModel opponentModel) |
Modifier and Type | Method and Description |
---|---|
void |
addOpponentAction(Action action)
Retrieves the opponent action, distributes it among several classes and updates some values.
|
void |
addOwnBid(Bid bid)
Adds bid to tracker
|
Bid |
getBestBid()
Gets a random bid from the top TOP_BIDS_PERCENTAGE % of our list.
|
Bid |
getBestBidUsingModel()
Get a best bid, using the estimated model of our opponent to try to find a bid that we both like
|
Bid |
getBestOpponentBidSoFar()
Gives the best bid the opponent has offered.
|
int |
getConsecutiveBidsDifferent()
Returns the number of consecutive bids in which this opponent has given
us a previously unoffered bid
|
Bid |
getLastOpponentBid()
Gives the last Bid the opponent offered us.
|
Bid |
getLastOwnBid()
Gives the last Bid we offered.
|
double |
getMinimumBidUtility()
Returns the minimum bid utility
|
int |
getNumberOfOpponentBids()
Returns the number of bids we have received from our opponent
|
void |
removeBid(Bid bid)
Removes given bid from utilityTable and also from bidTable
|
void |
setMinimumBidUtility(double mbu)
Sets the minimum bid utility
|
void |
updateBidTable()
This method updates the bidTable in the sense that it iterates over all utilities (in utiltyTable) and
removes the bids (in bidTable AND utilityTable) that have a utility below the minimumBidUtility.
|
boolean |
weAreStalling()
Returns true if we are stalling (ie 10 consecutive non-unique bids)
|
boolean |
weHaveOfferedThisBefore(Bid bid)
Returns true iff we have offered the given bid before
|
public BidTable(Agent a, UtilitySpace us, double mbu, OpponentModel opponentModel)
public void setMinimumBidUtility(double mbu)
mbu
- doublepublic double getMinimumBidUtility()
public boolean weHaveOfferedThisBefore(Bid bid)
bid
- Bidpublic Bid getBestBid()
public Bid getBestBidUsingModel()
model
- OpponentModelpublic void updateBidTable()
public void removeBid(Bid bid)
bid
- Bidpublic void addOpponentAction(Action action)
action
- The last action from the opponent.public Bid getLastOpponentBid()
public Bid getLastOwnBid()
public Bid getBestOpponentBidSoFar()
public int getNumberOfOpponentBids()
public int getConsecutiveBidsDifferent()
public void addOwnBid(Bid bid)
bid
- Bidpublic boolean weAreStalling()