source: src/main/java/negotiator/boaframework/opponentmodel/OppositeModel.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.5 KB
Line 
1package negotiator.boaframework.opponentmodel;
2
3import java.util.Map;
4
5import genius.core.Bid;
6import genius.core.boaframework.NegotiationSession;
7import genius.core.boaframework.OpponentModel;
8import genius.core.issue.Issue;
9import genius.core.utility.AdditiveUtilitySpace;
10import negotiator.boaframework.opponentmodel.tools.UtilitySpaceAdapter;
11
12/**
13 * Simple baseline opponent model which just mirror's the utility space of the
14 * agent. Note that the model does not measure the issue weights, it makes no
15 * sense.
16 *
17 * Tim Baarslag, Koen Hindriks, Mark Hendrikx, Alex Dirkzwager and Catholijn M.
18 * Jonker. Decoupling Negotiating Agents to Explore the Space of Negotiation
19 * Strategies
20 *
21 * @author Mark Hendrikx
22 */
23public class OppositeModel extends OpponentModel {
24
25 @Override
26 public void init(NegotiationSession negotiationSession, Map<String, Double> parameters) {
27 this.negotiationSession = negotiationSession;
28 this.opponentUtilitySpace = new UtilitySpaceAdapter(this, negotiationSession.getUtilitySpace().getDomain());
29 }
30
31 @Override
32 public void updateModel(Bid bid, double time) {
33 }
34
35 @Override
36 public double getBidEvaluation(Bid bid) {
37 try {
38 return (1.0 - negotiationSession.getUtilitySpace().getUtility(bid));
39 } catch (Exception e) {
40 e.printStackTrace();
41 }
42 return 0.0;
43 }
44
45 //
46 public double getWeight(Issue issue) {
47 return ((AdditiveUtilitySpace) negotiationSession.getUtilitySpace()).getWeight(issue.getNumber());
48 }
49
50 @Override
51 public String getName() {
52 return "Opposite Model";
53 }
54}
Note: See TracBrowser for help on using the repository browser.