public class UCTActionNode
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
UCTActionNode.UCTActionConstructor
A factory for generating UCTActionNode objects.
|
Modifier and Type | Field and Description |
---|---|
Action |
action
The action this action node wraps
|
int |
n
The number of of times this action node has been taken
|
java.util.Map<HashableState,java.util.List<UCTStateNode>> |
successorStates
The possible successor states.
|
double |
sumReturn
The sum return observed for this action node
|
Constructor and Description |
---|
UCTActionNode(Action a)
Generates a new action node for a given action.
|
Modifier and Type | Method and Description |
---|---|
void |
addSuccessor(UCTStateNode node)
Adds a successor node to the list of possible successors
|
double |
averageReturn()
Returns the average return
|
java.util.List<UCTStateNode> |
getAllSuccessors()
Returns a list of all successor nodes observed
|
boolean |
referencesSuccessor(UCTStateNode node)
Returns whether this action node has a observed a given successor state node in the past
|
void |
update(double sampledReturn)
Updates the node statistics with a sample return
|
public Action action
public double sumReturn
public int n
public java.util.Map<HashableState,java.util.List<UCTStateNode>> successorStates
public UCTActionNode(Action a)
a
- the action this node wraps.public double averageReturn()
public void update(double sampledReturn)
sampledReturn
- the sample return observedpublic void addSuccessor(UCTStateNode node)
node
- the uct successor nodepublic boolean referencesSuccessor(UCTStateNode node)
node
- the node which is checked to be in the current successor statespublic java.util.List<UCTStateNode> getAllSuccessors()