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 TypeMethodDescriptionvoidvoidaddChildren(List<MCTSNode> potentialChildren) voidbackup(int value) Propogates the value from this node up to its parentvoidgetAgent()returns the child with the highest UTCdoublegetScore()intbooleanvoidsetContext(Context context) voidsetExpanded(boolean expanded) voidsetScore(double score) voidsetVisits(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)
-