source: src/main/java/agents/ai2014/group10/Pair.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: 684 bytes
Line 
1package agents.ai2014.group10;
2
3@SuppressWarnings("hiding")
4public class Pair<Integer,Value> {
5
6 private final Integer i;
7 private final Value val;
8
9 public Pair(Integer i, Value val) {
10 this.i = i;
11 this.val = val;
12 }
13
14 public Integer getInteger() { return i; }
15 public Value getValue() { return val; }
16
17 @Override
18 public int hashCode() { return i.hashCode() ^ val.hashCode(); }
19
20 @Override
21 public boolean equals(Object o) {
22 if (o == null) return false;
23 if (!(o instanceof Pair)) return false;
24 @SuppressWarnings("unchecked")
25 Pair<Integer, Value> pairo = (Pair<Integer, Value>) o;
26 return this.i.equals(pairo.getInteger()) &&
27 this.val.equals(pairo.getValue());
28 }
29
30}
Note: See TracBrowser for help on using the repository browser.