source: src/main/java/agents/anac/y2014/BraveCat/AcceptanceStrategies/AcceptanceStrategy.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.7 KB
Line 
1package agents.anac.y2014.BraveCat.AcceptanceStrategies;
2
3import java.io.Serializable;
4import java.util.HashMap;
5
6import agents.anac.y2014.BraveCat.OfferingStrategies.OfferingStrategy;
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.boaframework.Actions;
12import genius.core.boaframework.BoaType;
13import genius.core.boaframework.SharedAgentState;
14import genius.core.protocol.BilateralAtomicNegotiationSession;
15
16public abstract class AcceptanceStrategy {
17 protected Schedular schedular;
18 protected NegotiationSession negotiationSession;
19 protected OfferingStrategy offeringStrategy;
20 protected SharedAgentState helper;
21 protected OpponentModel opponentModel;
22
23 public void init(NegotiationSession negotiationSession, OfferingStrategy offeringStrategy,
24 OpponentModel opponentModel, HashMap<String, Double> parameters) throws Exception {
25 this.negotiationSession = negotiationSession;
26 this.offeringStrategy = offeringStrategy;
27 this.opponentModel = opponentModel;
28 this.schedular = new Schedular(negotiationSession);
29 }
30
31 public String printParameters() {
32 return "";
33 }
34
35 public void setOpponentUtilitySpace(BilateralAtomicNegotiationSession fNegotiation) {
36 }
37
38 public abstract Actions determineAcceptability();
39
40 public final void storeData(Serializable object) {
41 this.negotiationSession.setData(BoaType.ACCEPTANCESTRATEGY, object);
42 }
43
44 public final Serializable loadData() {
45 return this.negotiationSession.getData(BoaType.ACCEPTANCESTRATEGY);
46 }
47
48 public void endSession(NegotiationResult result) {
49 }
50
51 public boolean isMAC() {
52 return false;
53 }
54}
Note: See TracBrowser for help on using the repository browser.