source: src/main/java/agents/anac/y2014/BraveCat/AcceptanceStrategies/AC_LAST.java

Last change on this file 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: 1.9 KB
Line 
1package agents.anac.y2014.BraveCat.AcceptanceStrategies;
2
3import genius.core.boaframework.Actions;
4
5public class AC_LAST extends AcceptanceStrategy
6{
7 @Override
8 public Actions determineAcceptability()
9 {
10 try
11 {
12 double MyBestBidUtility = this.negotiationSession.getUtilitySpace().getUtility(this.negotiationSession.getOwnBidHistory().getBestBidDetails().getBid());
13 double MyWorstBidUtility = this.negotiationSession.getUtilitySpace().getUtility(this.negotiationSession.getOwnBidHistory().getWorstBidDetails().getBid());
14 double OpponentLastBidUtility = this.negotiationSession.getUtilitySpace().getUtility(this.negotiationSession.getOpponentBidHistory().getLastBid());
15
16 if(OpponentLastBidUtility < this.negotiationSession.getUtilitySpace().getReservationValue())
17 return Actions.Reject;
18 //-------------------------------------------------------------------------------------------------------------------------------
19 //Tactic #1.
20 if(OpponentLastBidUtility >= 0.8)
21 return Actions.Accept;
22 //Tactic #2.
23 if(OpponentLastBidUtility >= MyBestBidUtility)
24 return Actions.Accept;
25 //Tactic #3.
26 if(OpponentLastBidUtility >= (double) (MyBestBidUtility + MyWorstBidUtility) / 2)
27 return Actions.Accept;
28 //Tactic #4.
29 if(this.schedular.LastRound() || this.schedular.FinalRounds())
30 return Actions.Accept;
31 //-------------------------------------------------------------------------------------------------------------------------------
32 return Actions.Reject;
33 }
34 catch (Exception ex)
35 {
36 System.out.println("Exception occurred while determining acceptability!");
37 }
38 return Actions.Reject;
39 }
40}
Note: See TracBrowser for help on using the repository browser.