-
Notifications
You must be signed in to change notification settings - Fork 10
Generating a random bid with a utility threshold
Taha Doğan Güneş edited this page Oct 24, 2017
·
1 revision
Beware that if utilityThreshold
is really high (e.g. 0.9), there might not be a possible offer in given preference profile.
To be safe, compare your utilityThreshold
with this.utilitySpace.getMaxUtilityBid()
.
public Bid generateRandomBidWithUtility(double utilityThreshold) {
Bid randomBid;
double utility;
do {
randomBid = generateRandomBid();
try {
utility = utilitySpace.getUtility(randomBid);
} catch (Exception e)
{
utility = 0.0;
}
}
while (utility < utilityThreshold);
return randomBid;
}
Please create an issue, if you find any errors or you want a topic covered in this wiki.
- Java Programming Cheatsheet
- Setting Up Genius Environment
- Stacked Alternating Offers Protocol
- AbstractNegotationParty Methods
- How to generate a random bid?
- How to generate a random bid with a utility threshold?
- How to change the content of a bid?
- How to keep track of time in a negotiation session?
- How to get the maximum and minimum bid?
- How to iterate all bids in a domain?
- How to access weights of each issue?
- How to access the evaluation of a value?