source: src/main/java/agents/anac/y2015/xianfa/Node.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 agents.anac.y2015.xianfa;
2
3import java.util.ArrayList;
4
5import genius.core.issue.Value;
6
7public class Node {
8
9 private Node parent;
10 private ArrayList<Node> child = new ArrayList<Node>();
11 private int depth;
12 private int number;
13 private Value value;
14 private double evaluation;
15 private boolean visited = false;
16
17 public boolean isVisited() {
18 return visited;
19 }
20
21 public void setVisited(boolean visited) {
22 this.visited = visited;
23 }
24
25 public Node() {
26
27 }
28
29 public Node(int number, Value value, int depth, double evaluation) {
30 this.number = number;
31 this.depth = depth;
32 this.value = value;
33 this.evaluation = evaluation;
34 }
35
36 public void add(Node node) {
37 child.add(node);
38 node.setParent(this);
39 }
40
41 public Node getParent() {
42 return parent;
43 }
44
45 public ArrayList<Node> getChild() {
46 return child;
47 }
48
49 public int getDepth() {
50 return depth;
51 }
52
53 public int getNumber() {
54 return number;
55 }
56
57 public Value getValue() {
58 return value;
59 }
60
61 public double getEvaluation() {
62 return evaluation;
63 }
64
65 public void setParent(Node node) {
66 parent = node;
67 }
68
69 public void show() {
70 System.out.println("this is " + number + " & " + depth + " & " + value + " & " + evaluation);
71 }
72
73}
Note: See TracBrowser for help on using the repository browser.