source: src/main/java/agents/ImmediateAcceptor.java@ 203

Last change on this file since 203 was 127, checked in by Wouter Pasman, 6 years ago

#41 ROLL BACK of rev.126 . So this version is equal to rev. 125

File size: 929 bytes
Line 
1package agents;
2
3import genius.core.Bid;
4import genius.core.SupportedNegotiationSetting;
5
6/**
7 * This agent does not concede, but will accept anything equal to or above the
8 * reservation value. For undiscounted domain only.
9 */
10public class ImmediateAcceptor extends TimeDependentAgent {
11 @Override
12 public double getE() {
13 return 0;
14 }
15
16 @Override
17 public String getName() {
18 return "Immediate Acceptor";
19 }
20
21 @Override
22 public boolean isAcceptable(Bid plannedBid) {
23 Bid opponentLastBid = getOpponentLastBid();
24 if (getUtility(opponentLastBid) >= utilitySpace.getReservationValue())
25 return true;
26 return false;
27 }
28
29 @Override
30 public SupportedNegotiationSetting getSupportedNegotiationSetting() {
31 return SupportedNegotiationSetting.getLinearUtilitySpaceInstance();
32 }
33
34 @Override
35 public String getDescription() {
36 return "accept when offer is above reservation value";
37 }
38
39}
Note: See TracBrowser for help on using the repository browser.