Class BackwardSearch


public abstract class BackwardSearch extends StateSpaceSearch
Represents a backward search through the space of states, starting at the problem goal and ending in the initial state. In the graph defined by this search, nodes are goals to be achieved and edges are steps.
Author:
Stephen G. Ware
  • Field Details

    • root

      public final BackwardRoot root
      The root node of the search space (i.e. a plan with 0 steps)
  • Constructor Details

    • BackwardSearch

      public BackwardSearch(StateSpaceProblem problem, SearchBudget budget)
      Creates a backward state space search for a given problem.
      Parameters:
      problem - the problem whose state space will be searched
      budget - the maximum number of states that may be searched and the maximum number of milliseconds the search may take
  • Method Details

    • countVisited

      public int countVisited()
      Description copied from class: Search
      Returns the total number of nodes that have been visited in this search space since it was created.
      Specified by:
      countVisited in class Search
      Returns:
      the number of visited nodes
    • countGenerated

      public int countGenerated()
      Description copied from class: Search
      Returns the total number of nodes that have been generated in this search since it was created.
      Specified by:
      countGenerated in class Search
      Returns:
      the number of expanded ndoes