Last change
on this file since 126 was 1, checked in by Wouter Pasman, 6 years ago |
Initial import : Genius 9.0.0
|
File size:
687 bytes
|
Line | |
---|
1 | package agents.ai2014.group2;
|
---|
2 |
|
---|
3 | import genius.core.utility.AdditiveUtilitySpace;
|
---|
4 |
|
---|
5 | class G2OpponentModel {
|
---|
6 | G2UtilitySpace utilitySpace;
|
---|
7 | private int _nBids = 0;
|
---|
8 | //private Domain _domain;
|
---|
9 |
|
---|
10 | G2OpponentModel(AdditiveUtilitySpace domain) {
|
---|
11 | utilitySpace = new G2UtilitySpace(domain);
|
---|
12 | utilitySpace.resetAll();
|
---|
13 | //_domain = domain.getDomain();
|
---|
14 | }
|
---|
15 |
|
---|
16 | public void updateModel(G2Bid bid){
|
---|
17 | utilitySpace.updateIssues(bid, _nBids);
|
---|
18 | _nBids++;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public double getUtility(G2Bid bid){
|
---|
22 | return utilitySpace.calculateUtility(bid);
|
---|
23 | }
|
---|
24 |
|
---|
25 | public String getUtilitySpaceString() {
|
---|
26 | return utilitySpace.allDataString();
|
---|
27 | }
|
---|
28 |
|
---|
29 | public G2UtilitySpace getUtilitySpace() {
|
---|
30 | return utilitySpace;
|
---|
31 | }
|
---|
32 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.