1 | package uva.projectai.y2018.jasparon;
|
---|
2 |
|
---|
3 | import java.util.HashMap;
|
---|
4 |
|
---|
5 | import genius.core.boaframework.BoaParty;
|
---|
6 | import genius.core.boaframework.NegotiationSession;
|
---|
7 | import genius.core.boaframework.SessionData;
|
---|
8 | import genius.core.parties.NegotiationInfo;
|
---|
9 | import genius.core.persistent.PersistentDataType;
|
---|
10 | import negotiator.boaframework.acceptanceconditions.other.AC_Next;
|
---|
11 | import negotiator.boaframework.omstrategy.NullStrategy;
|
---|
12 | import negotiator.boaframework.opponentmodel.AgentXFrequencyModel;
|
---|
13 |
|
---|
14 | @SuppressWarnings("serial")
|
---|
15 | public class Jasparon extends BoaParty {
|
---|
16 |
|
---|
17 | public Jasparon() {
|
---|
18 | super(null, new HashMap<String, Double>(), null,
|
---|
19 | new HashMap<String, Double>(), null,
|
---|
20 | new HashMap<String, Double>(), null,
|
---|
21 | new HashMap<String, Double>());
|
---|
22 | }
|
---|
23 |
|
---|
24 | @Override
|
---|
25 | public void init(NegotiationInfo info) {
|
---|
26 | SessionData sessionData = null;
|
---|
27 | if (info.getPersistentData()
|
---|
28 | .getPersistentDataType() == PersistentDataType.SERIALIZABLE) {
|
---|
29 | sessionData = (SessionData) info.getPersistentData().get();
|
---|
30 | }
|
---|
31 | if (sessionData == null) {
|
---|
32 | sessionData = new SessionData();
|
---|
33 | }
|
---|
34 |
|
---|
35 | negotiationSession = new NegotiationSession(sessionData,
|
---|
36 | info.getUtilitySpace(), info.getTimeline(), null,
|
---|
37 | info.getUserModel());
|
---|
38 | opponentModel = new AgentXFrequencyModel();
|
---|
39 | opponentModel.init(negotiationSession, new HashMap<String, Double>());
|
---|
40 | omStrategy = new NullStrategy(negotiationSession);
|
---|
41 | offeringStrategy = new JasparonBiddingStrategy(negotiationSession,
|
---|
42 | opponentModel, omStrategy);
|
---|
43 |
|
---|
44 | acceptConditions = new AC_Next(negotiationSession, offeringStrategy, 1,
|
---|
45 | 0);
|
---|
46 | // we have init'd all params already, don't call super init
|
---|
47 | }
|
---|
48 |
|
---|
49 | @Override
|
---|
50 | public String getDescription() {
|
---|
51 | return "Agent Jasperon";
|
---|
52 | }
|
---|
53 | }
|
---|