source: src/main/java/genius/core/NegotiationResult.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.2 KB
Line 
1package genius.core;
2
3import genius.core.actions.Accept;
4import genius.core.actions.Action;
5
6public class NegotiationResult {
7
8 /** The utility received by the agent at the end of the negotiation. */
9 private final double myDiscountedUtility;
10 /** The last action conducted in the negotiation. */
11 private final Action lastAction;
12 /** The last bid in the negotiation. */
13 private final Bid lastBid;
14
15 public NegotiationResult(double myDiscountedUtility, Action lastAction, Bid lastBid) {
16 this.myDiscountedUtility = myDiscountedUtility;
17 this.lastAction = lastAction;
18 this.lastBid = lastBid;
19 }
20
21 /**
22 * @return true when the match ended in acceptance.
23 */
24 public boolean isAgreement() {
25 return lastAction instanceof Accept;
26 }
27
28 /**
29 * @return the utility received at the end of the negotiation.
30 */
31 public double getMyDiscountedUtility() {
32 return myDiscountedUtility;
33 }
34
35 /**
36 * @return last action executed in the negotiation.
37 */
38 public Action getLastAction() {
39 return lastAction;
40 }
41
42 /**
43 * @return last bid offered in the negotiation.
44 */
45 public Bid getLastBid() {
46 return lastBid;
47 }
48
49 public String toString() {
50 return myDiscountedUtility + "\n" + lastAction + "\n" + lastBid;
51 }
52}
Note: See TracBrowser for help on using the repository browser.