Package edu.uky.ai.planning.pg
Class SubgraphSearch
java.lang.Object
edu.uky.ai.planning.Search
edu.uky.ai.planning.pg.SubgraphSearch
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 Summary
FieldsModifier and TypeFieldDescriptionprotected final SubgraphSpaceRootThe root node of the search space -
Constructor Summary
ConstructorsConstructorDescriptionSubgraphSearch(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. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the total number of nodes that have been generated in this search since it was created.intReturns the total number of nodes that have been visited in this search space since it was created.protected abstract SubgraphSpaceNodeSearches the space ofSubgraphSpaceNodes until a node which represents a solution is found.final Plansolve()Searches the space until a solution is found.
-
Field Details
-
root
The root node of the search space
-
-
Constructor Details
-
SubgraphSearch
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 searchedbudget- the search budgetnodes- a subset of nodes from the plan graph
-
-
Method Details
-
countVisited
public int countVisited()Description copied from class:SearchReturns the total number of nodes that have been visited in this search space since it was created.- Specified by:
countVisitedin classSearch- Returns:
- the number of visited nodes
-
countGenerated
public int countGenerated()Description copied from class:SearchReturns the total number of nodes that have been generated in this search since it was created.- Specified by:
countGeneratedin classSearch- Returns:
- the number of expanded ndoes
-
solve
Description copied from class:SearchSearches the space until a solution is found. -
findSubgraph
Searches the space ofSubgraphSpaceNodes until a node which represents a solution is found.- Returns:
- the node representing a solution
-