source: src/main/java/agents/anac/y2011/ValueModelAgent/RealValuedecreaseProxy.java@ 126

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: 1.0 KB
Line 
1package agents.anac.y2011.ValueModelAgent;
2
3public class RealValuedecreaseProxy extends ValueDecrease {
4
5 private double portion;
6 private ValueDecrease worstScale;
7 RealValuedecreaseProxy(ValueDecrease worstScale,double portion) {
8 super(0, 0, 0);
9 this.portion =portion;
10 this.worstScale=worstScale;
11 }
12 @Override
13 public double getDecrease(){
14 return worstScale.getDecrease()*portion;
15 }
16 public double getReliabilty(){
17 return worstScale.getReliabilty();
18 }
19 public double getDeviance(){
20 return worstScale.getDeviance()*portion;
21 }
22 public int lastSent(){
23 return worstScale.lastSent();
24 }
25 public void sent(int bidIndex){
26 worstScale.sent(bidIndex);
27 }
28 public void updateWithNewValue(double newVal,double newReliability){
29 //if portion is 0, than this is the best case scenario...
30 //unless I add a way to turn the linear direction of the issue
31 //there is nothing we can learn from newVal, and any other value
32 //but 0 is considered a mistake
33 if(portion>0){
34 worstScale.updateWithNewValue(newVal/portion, newReliability);
35 }
36 }
37
38}
Note: See TracBrowser for help on using the repository browser.