source: src/main/java/agents/anac/y2014/BraveCat/OpponentModels/DBOMModel/DBOMModel.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.7 KB
Line 
1package agents.anac.y2014.BraveCat.OpponentModels.DBOMModel;
2
3import java.util.ArrayList;
4import java.util.List;
5
6import agents.anac.y2014.BraveCat.OpponentModels.OpponentModel;
7import agents.anac.y2014.BraveCat.necessaryClasses.NegotiationSession;
8import genius.core.Bid;
9import genius.core.bidding.BidDetails;
10import genius.core.issue.Issue;
11import genius.core.utility.AdditiveUtilitySpace;
12
13public class DBOMModel extends OpponentModel {
14 // ----------------------------------------------------------------------------------------------------------------------------------------------
15 List<Bid> opponentUniqueBidHistory;
16
17 private OpponentUtilitySimilarityBasedEstimator s;
18
19 @Override
20 public void init(NegotiationSession negoSession) throws Exception {
21 System.out.println("Opponent Model Initializing...");
22 this.negotiationSession = negoSession;
23 s = new OpponentUtilitySimilarityBasedEstimator(negotiationSession, 100);
24 opponentUniqueBidHistory = new ArrayList();
25 System.out.println("Opponent Model Initialized Successfully!");
26 }
27
28 @Override
29 public void updateModel(Bid bid, double time) {
30 }
31
32 @Override
33 public double getBidEvaluation(BidDetails bid) throws Exception {
34 double estimatedBidEvaluation = 0;
35 estimatedBidEvaluation = s.GetBidUtility(bid);
36 // System.out.println(estimatedBidEvaluation);
37 return estimatedBidEvaluation
38 * this.negotiationSession.getUtilitySpace().getUtility(
39 bid.getBid());
40 }
41
42 @Override
43 public double getWeight(Issue issue) {
44 return ((AdditiveUtilitySpace) this.negotiationSession
45 .getUtilitySpace()).getWeight(issue.getNumber());
46 }
47
48 @Override
49 public String getName() {
50 return "DBOMModel";
51 }
52}
Note: See TracBrowser for help on using the repository browser.