Class SubgraphSearch

java.lang.Object
edu.uky.ai.planning.Search
edu.uky.ai.planning.pg.SubgraphSearch

public abstract class SubgraphSearch extends Search
This class represents the second phase of a PlanGraphSearch, in which we search for a subgraph of a plan graph that represents a solution to the problem. The members of the plan graph family of planners vary in how they implement this phase of the search.
Author:
Stephen G. Ware
  • Field Details

  • Constructor Details

    • SubgraphSearch

      public SubgraphSearch(PlanGraph graph, SearchBudget budget, Subgraph nodes)
      Constructs a new subgraph space search process for the given plan graph and starting with the given subset of nodes from that graph.
      Parameters:
      graph - the plan graph to be searched
      budget - the search budget
      nodes - a subset of nodes from the plan graph
  • 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
    • solve

      public final Plan solve()
      Description copied from class: Search
      Searches the space until a solution is found.
      Specified by:
      solve in class Search
      Returns:
      the solution found
    • findSubgraph

      protected abstract SubgraphSpaceNode findSubgraph()
      Searches the space of SubgraphSpaceNodes until a node which represents a solution is found.
      Returns:
      the node representing a solution