source: src/main/java/agents/rlboa/RandomBOAagent.java@ 346

Last change on this file since 346 was 153, 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

!! close SessionInfo after tournament; this caused /tmp/ to fill up with GeniusData files

This commit finalized the RLBOA project and it is now ready for use

Our own package (uva.project.:

  • Moved to agents.rlboa
  • 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 
1package agents.rlboa;
2
3import genius.core.boaframework.BOAagentBilateral;
4import genius.core.boaframework.NoModel;
5import negotiator.boaframework.acceptanceconditions.other.AC_Next;
6import negotiator.boaframework.offeringstrategy.other.Random_Offering;
7import negotiator.boaframework.omstrategy.NullStrategy;
8
9import java.util.HashMap;
10
11@SuppressWarnings("deprecation")
12public class RandomBOAagent extends BOAagentBilateral {
13
14
15 /**
16 *
17 */
18 private static final long serialVersionUID = 1L;
19
20 @Override
21 public void agentSetup() {
22
23 // AverageTitForTat2 makes decisions based on its own preferences
24 opponentModel = new NoModel();
25 opponentModel.init(negotiationSession, new HashMap<String, Double>());
26
27 // OMS not relevant for NoModel
28 omStrategy = new NullStrategy(negotiationSession);
29
30
31 offeringStrategy = new Random_Offering();
32
33 try {
34 offeringStrategy.init(negotiationSession, opponentModel, omStrategy, null);
35 } catch (Exception e) {
36 e.printStackTrace();
37 }
38
39
40 acceptConditions = new AC_Next(negotiationSession, offeringStrategy, 1, 0);
41 setDecoupledComponents(acceptConditions, offeringStrategy, opponentModel, omStrategy);
42 }
43
44 @Override
45 public String getName() {
46 return "RandomOffering BOA";
47 }
48
49}
Note: See TracBrowser for help on using the repository browser.