Last change
on this file since 126 was 126, checked in by Aron Hammond, 6 years ago |
Added function to calculate opposition to MultiLateralAnalysis.java
Moved code to add RLBOA listeners to RLBOAUtils is misc package
Added input for strategyParameters to SessionPanel (gui)
!! close SessionInfo after tournament; this caused /tmp/ to fill up with GeniusData files
Our own package:
- Added opponents and strategies that are mentioned in the report
- Change class hierarchy, agents can now extend from RLBOAagentBilateral to inherit RL functionality.
- States extend from AbstractState
|
File size:
605 bytes
|
Rev | Line | |
---|
[126] | 1 | package agents.bayesianopponentmodel;
|
---|
| 2 |
|
---|
| 3 | import genius.core.Bid;
|
---|
| 4 | import genius.core.utility.AdditiveUtilitySpace;
|
---|
| 5 |
|
---|
| 6 | @SuppressWarnings("serial")
|
---|
| 7 | public 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.