Changeset 19 for exampleparties/anac2019/agentgg/src
- Timestamp:
- 06/22/20 16:08:04 (4 years ago)
- Location:
- exampleparties/anac2019/agentgg/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
exampleparties/anac2019/agentgg/src/main/java/geniusweb/exampleparties/agentgg/AgentGG.java
r12 r19 39 39 * Xu and Peihao Ren of University of Southampton. This party requires a partial 40 40 * ordering as input (notice that most profiles are also partial ordering 41 * anyway). 41 * anyway). Much javadoc has been added after reverse engineering, to enable the 42 * translation. 42 43 */ 43 44 public class AgentGG extends DefaultParty { … … 47 48 private double offerLowerRatio = 1.0; 48 49 private double offerHigherRatio = 1.1; 49 pr ivatedouble MAX_IMPORTANCE;50 pr ivatedouble MIN_IMPORTANCE;50 protected double MAX_IMPORTANCE; 51 protected double MIN_IMPORTANCE; 51 52 private double MEDIAN_IMPORTANCE; 52 53 private Bid MAX_IMPORTANCE_BID; … … 319 320 this.reservationImportanceRatio + 0.2); 320 321 } 322 // #1799 HACK not in original code : somethmes above computation goes 323 // wildly off bounds. 324 if (this.offerLowerRatio > 1) 325 this.offerLowerRatio = 0.9999; 321 326 this.offerHigherRatio = this.offerLowerRatio + 0.1; 322 327 } … … 412 417 * the threshold range, and return the bid with the highest opponent import. 413 418 * 414 * @param lowerRatio Generate a lower limit for the random bid 415 * @param upperRatio Generate random bid upper limit 419 * @param lowerRatio Generate a lower limit for the random bid in [0,1] 420 * @param upperRatio Generate random bid upper limit can be >1 416 421 * @return Bid 417 422 * @throws IOException -
exampleparties/anac2019/agentgg/src/main/java/geniusweb/exampleparties/agentgg/ImpMap.java
r12 r19 115 115 /** 116 116 * @param bid the bid to get the importance (utility?) of. 117 * @return the importance value of bid. CHECK is this inside [0,1]? 117 * @return the importance value of bid. Note, this this returns possibly 118 * large (>1) values, as the importance is not normalized. 118 119 */ 119 120 public double getImportance(Bid bid) { -
exampleparties/anac2019/agentgg/src/test/java/geniusweb/exampleparties/agentgg/AgentGGTest.java
r12 r19 89 89 90 90 @Test 91 public void testMinMaxRealistic() { 92 assertTrue(party.MIN_IMPORTANCE >= 0); 93 assertTrue(party.MIN_IMPORTANCE < 1); 94 assertTrue(party.MAX_IMPORTANCE >= 0); 95 assertTrue(party.MAX_IMPORTANCE < 1); 96 assertTrue(party.MIN_IMPORTANCE <= party.MAX_IMPORTANCE); 97 } 98 99 @Test 91 100 public void getDescriptionTest() { 92 101 assertNotNull(party.getDescription());
Note:
See TracChangeset
for help on using the changeset viewer.