source: src/main/java/agents/anac/y2014/BraveCat/OpponentModelStrategies/NullStrategy.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.2 KB
Line 
1 package agents.anac.y2014.BraveCat.OpponentModelStrategies;
2
3 import agents.anac.y2014.BraveCat.OpponentModels.OpponentModel;
4 import java.util.HashMap;
5 import java.util.List;
6 import java.util.Random;
7 import agents.anac.y2014.BraveCat.necessaryClasses.NegotiationSession;
8import genius.core.bidding.BidDetails;
9
10 public class NullStrategy extends OMStrategy
11 {
12 private Random rand;
13 private double updateThreshold = 1.1D;
14
15 public NullStrategy()
16 {
17 }
18
19 public NullStrategy(NegotiationSession negotiationSession)
20 {
21 this.negotiationSession = negotiationSession;
22 this.rand = new Random();
23 }
24
25 @Override
26 public void init(NegotiationSession negotiationSession, OpponentModel model, HashMap<String, Double> parameters) throws Exception {
27 super.init(negotiationSession, model);
28 this.rand = new Random();
29 this.negotiationSession = negotiationSession;
30 if (parameters.containsKey("t"))
31 this.updateThreshold = ((Double)parameters.get("t")).doubleValue();
32 }
33
34 @Override
35 public BidDetails getBid(List<BidDetails> allBids)
36 {
37 return (BidDetails)allBids.get(0);
38 }
39
40 @Override
41 public boolean canUpdateOM()
42 {
43 return this.negotiationSession.getTime() < this.updateThreshold;
44 }
45 }
Note: See TracBrowser for help on using the repository browser.