Class ForwardNode

java.lang.Object
edu.uky.ai.planning.ss.ForwardNode
All Implemented Interfaces:
StateSpaceNode
Direct Known Subclasses:
ForwardRoot

public class ForwardNode extends Object implements StateSpaceNode
Represents a node in a forward state space search graph, where a node is a state and the plan taken to reach that state from the initial state.
Author:
Stephen G. Ware
  • Field Details

    • plan

      public final ForwardPlan plan
      The plan taken to reach this state
    • state

      public final State state
      The current state
    • parent

      public final ForwardNode parent
      This node's parent node (i.e. the state before the last step)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPlan

      public Plan getPlan()
      Description copied from interface: StateSpaceNode
      Returns the plan this node represents.
      Specified by:
      getPlan in interface StateSpaceNode
      Returns:
      the plan
    • getRoot

      public final ForwardRoot getRoot()
      Description copied from interface: StateSpaceNode
      Returns the root node of the search space.
      Specified by:
      getRoot in interface StateSpaceNode
      Returns:
      the root
    • expand

      public ForwardNode expand(Step step, State state)
      Expands the child node that would be generated by taking this step. If the parent has not yet been visited, the parent is marked as visited.
      Parameters:
      step - the step which results in the child state
      state - the child state
      Returns:
      a node for the resulting state