Package edu.tufts.hrilab.action.mcts
Class MCTSNode
java.lang.Object
edu.tufts.hrilab.action.mcts.MCTSNode
Custom implementation of an MCTS tree node. Each node represents a bound action to be taken,
with both arguments and actor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addChildren
(List<MCTSNode> potentialChildren) void
backup
(int value) Propogates the value from this node up to its parentvoid
getAgent()
returns the child with the highest UTCdouble
getScore()
int
boolean
void
setContext
(Context context) void
setExpanded
(boolean expanded) void
setScore
(double score) void
setVisits
(int visits)
-
Constructor Details
-
MCTSNode
Create a pre-bound MCTS node.- Parameters:
entry
-bindings
-parent
-agent
-
-
MCTSNode
Create an unbound MCTS node. Only for creation of the root node.- Parameters:
context
-parent
-agent
-
-
-
Method Details
-
generateContext
public void generateContext() -
getAgent
-
getVisits
public int getVisits() -
setVisits
public void setVisits(int visits) -
getScore
public double getScore() -
setScore
public void setScore(double score) -
getBestChild
returns the child with the highest UTC- Returns:
-
backup
public void backup(int value) Propogates the value from this node up to its parent- Parameters:
value
-
-
toActionDesc
-
isExpanded
public boolean isExpanded() -
getChildren
-
addChild
-
addChildren
-
getContext
-
setContext
-
getParent
-
setExpanded
public void setExpanded(boolean expanded)
-