public class Group4 extends AbstractNegotiationParty
deadlines, rand, timeline, utilitySpace
Constructor and Description |
---|
Group4() |
Modifier and Type | Method and Description |
---|---|
Action |
chooseAction(java.util.List<java.lang.Class<? extends Action>> validActions)
When this function is called, it is expected that the Party chooses one
of the actions from the possible action list and returns an instance of
the chosen action.
|
java.lang.String |
getDescription() |
void |
init()
initiate the agent When the negotiation start, assume an agent want to
reach its highest utility So set the MINIMUM_BID_UTILITY to 0.9
|
boolean |
isAcceptable(Action action)
Determine whether a bid is acceptable 1.
|
Action |
offerBid()
Bidding strategy is based on random walk strategy the utility of the
chosen bid should be higher than the MINIMUM_BID_UTILITY and lower than
MAXIMUM_BID_UTILITY (agent should offer a bid that is acceptable to
itself and is easier to accept by opponents) the chosen bid should be a
better bid to all opponent compared to their last bid try to find a bid
that meet the requirements above in 1000 loops return the last offered
bid failed to find a bid in 1000 loops
|
void |
receiveMessage(AgentID sender,
Action action)
This method is called when another
NegotiationParty chose an
Action . |
int |
Refuse_Count(Bid bid)
count the number that how many time this bid was refused by opponent
|
void |
saveBestBid(Action Action)
save the best bid offered by opponents
|
void |
saveOpponentHistoricalBid(Action action)
Save bids offered by opponents
|
void |
setLowerLimit()
set the lower-limit lower-limit = Max((0.9 - CurrentTime/TotalTime),
BEST_BID_OPPONENT_OFFER_UTILITY - 0.015 * CurrentTime/TotalTime)
|
void |
setUpperLimit()
set the upper-limit upper-limit = MINIMUM_BID_UTILITY + (0.9 -
MINIMUM_BID_UTILITY) * (0.5 / Refuse Count of MY_LAST_BID) + 0.1 *
(CurrentTime/TotalTime)
|
void |
showBidDetails(Bid bid)
show bid details (not used)
|
void |
showUtilitySpaceDetails()
show all values for all issues in current utility space (not used)
|
generateRandomBid, getNumberOfParties, getPartyId, getProtocol, getRandomValue, getTimeLine, getUtility, getUtilitySpace, getUtilityWithDiscount, init, toString
public void init()
public java.lang.String getDescription()
getDescription
in interface NegotiationParty
getDescription
in class AbstractNegotiationParty
public Action chooseAction(java.util.List<java.lang.Class<? extends Action>> validActions)
NegotiationParty
validActions
- List of all actions possible.Action
.public boolean isAcceptable(Action action)
Action
- public void receiveMessage(AgentID sender, Action action)
NegotiationParty
NegotiationParty
chose an
Action
.receiveMessage
in interface NegotiationParty
receiveMessage
in class AbstractNegotiationParty
sender
- The initiator of the action.This is either the AgentID, or
null if the sender is not an agent (e.g., the protocol).action
- The action performedpublic Action offerBid()
public void saveOpponentHistoricalBid(Action action)
Action
- public void saveBestBid(Action Action)
Action
- public int Refuse_Count(Bid bid)
bid
- public void setUpperLimit()
public void setLowerLimit()
public void showUtilitySpaceDetails()
public void showBidDetails(Bid bid)