1 | package agents.rlboa;
|
---|
2 |
|
---|
3 | import genius.core.boaframework.BOAagentBilateral;
|
---|
4 | import genius.core.boaframework.NoModel;
|
---|
5 | import negotiator.boaframework.acceptanceconditions.other.AC_Next;
|
---|
6 | import negotiator.boaframework.offeringstrategy.other.Random_Offering;
|
---|
7 | import negotiator.boaframework.omstrategy.NullStrategy;
|
---|
8 |
|
---|
9 | import java.util.HashMap;
|
---|
10 |
|
---|
11 | @SuppressWarnings("deprecation")
|
---|
12 | public 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 | }
|
---|