1 | package agents.anac.y2014.BraveCat.OpponentModels.DBOMModel;
|
---|
2 |
|
---|
3 | import java.util.ArrayList;
|
---|
4 | import java.util.List;
|
---|
5 |
|
---|
6 | import agents.anac.y2014.BraveCat.OpponentModels.OpponentModel;
|
---|
7 | import agents.anac.y2014.BraveCat.necessaryClasses.NegotiationSession;
|
---|
8 | import genius.core.Bid;
|
---|
9 | import genius.core.bidding.BidDetails;
|
---|
10 | import genius.core.issue.Issue;
|
---|
11 | import genius.core.utility.AdditiveUtilitySpace;
|
---|
12 |
|
---|
13 | public 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 | } |
---|