Class MCTSNode

java.lang.Object
edu.tufts.hrilab.action.mcts.MCTSNode

public class MCTSNode extends Object
Custom implementation of an MCTS tree node. Each node represents a bound action to be taken, with both arguments and actor.
  • Constructor Details

    • MCTSNode

      public MCTSNode(ActionDBEntry entry, Map<String,Object> bindings, MCTSNode parent, Symbol agent)
      Create a pre-bound MCTS node.
      Parameters:
      entry -
      bindings -
      parent -
      agent -
    • MCTSNode

      public MCTSNode(Context context, MCTSNode parent, Symbol agent)
      Create an unbound MCTS node. Only for creation of the root node.
      Parameters:
      context -
      parent -
      agent -
  • Method Details

    • generateContext

      public void generateContext()
    • getAgent

      public Symbol getAgent()
    • getVisits

      public int getVisits()
    • setVisits

      public void setVisits(int visits)
    • getScore

      public double getScore()
    • setScore

      public void setScore(double score)
    • getBestChild

      public MCTSNode 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

      public String toActionDesc()
    • isExpanded

      public boolean isExpanded()
    • getChildren

      public List<MCTSNode> getChildren()
    • addChild

      public void addChild(MCTSNode newNode)
    • addChildren

      public void addChildren(List<MCTSNode> potentialChildren)
    • getContext

      public Context getContext()
    • setContext

      public void setContext(Context context)
    • getParent

      public MCTSNode getParent()
    • setExpanded

      public void setExpanded(boolean expanded)