source: src/main/java/agents/bayesianopponentmodel/OpponentModelUtilSpace.java@ 1

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

Initial import : Genius 9.0.0

File size: 631 bytes
RevLine 
[1]1package agents.bayesianopponentmodel;
2
3import genius.core.Bid;
4import genius.core.utility.AdditiveUtilitySpace;
5
6@SuppressWarnings("serial")
7public class OpponentModelUtilSpace extends AdditiveUtilitySpace {
8 OpponentModel opponentmodel;
9
10 public OpponentModelUtilSpace(OpponentModel opmod) {
11 super(opmod.getDomain());
12 opponentmodel = opmod;
13 }
14
15 public double getUtility(Bid b) {
16 double u = 0.;
17 try {
18 u = opponentmodel.getNormalizedUtility(b);
19 } catch (Exception e) {
20 e.printStackTrace();
21 System.out.println("getNormalizedUtility failed. returning 0");
22 u = 0.;
23 }
24 return u;
25 }
26}
Note: See TracBrowser for help on using the repository browser.