source: src/main/java/agents/bayesianopponentmodel/OpponentModelUtilSpace.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: 631 bytes
Line 
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.