source: src/main/java/agents/anac/y2014/BraveCat/OfferingStrategies/OfferingStrategy.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.9 KB
Line 
1package agents.anac.y2014.BraveCat.OfferingStrategies;
2
3import java.io.Serializable;
4import java.util.HashMap;
5
6import agents.anac.y2014.BraveCat.OpponentModelStrategies.OMStrategy;
7import agents.anac.y2014.BraveCat.OpponentModels.OpponentModel;
8import agents.anac.y2014.BraveCat.necessaryClasses.NegotiationSession;
9import agents.anac.y2014.BraveCat.necessaryClasses.Schedular;
10import genius.core.NegotiationResult;
11import genius.core.bidding.BidDetails;
12import genius.core.boaframework.BoaType;
13import genius.core.boaframework.SharedAgentState;
14
15public abstract class OfferingStrategy {
16 protected Schedular schedular;
17 protected BidDetails nextBid;
18 protected NegotiationSession negotiationSession;
19 protected OpponentModel opponentModel;
20 protected OMStrategy omStrategy;
21 protected SharedAgentState helper;
22 protected boolean endNegotiation;
23
24 public void init(NegotiationSession negotiationSession, OpponentModel opponentModel, OMStrategy omStrategy,
25 HashMap<String, Double> parameters) throws Exception {
26 this.negotiationSession = negotiationSession;
27 this.opponentModel = opponentModel;
28 this.omStrategy = omStrategy;
29 this.endNegotiation = false;
30 this.schedular = new Schedular(negotiationSession);
31 }
32
33 public abstract BidDetails determineOpeningBid();
34
35 public abstract BidDetails determineNextBid();
36
37 public BidDetails getNextBid() {
38 return this.nextBid;
39 }
40
41 public void setNextBid(BidDetails nextBid) {
42 this.nextBid = nextBid;
43 }
44
45 public SharedAgentState getHelper() {
46 return this.helper;
47 }
48
49 public boolean isEndNegotiation() {
50 return this.endNegotiation;
51 }
52
53 public final void storeData(Serializable object) {
54 this.negotiationSession.setData(BoaType.BIDDINGSTRATEGY, object);
55 }
56
57 public final Serializable loadData() {
58 return this.negotiationSession.getData(BoaType.BIDDINGSTRATEGY);
59 }
60
61 public void endSession(NegotiationResult result) {
62 }
63
64 public abstract String GetName();
65}
Note: See TracBrowser for help on using the repository browser.