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 SubgraphSpaceRoot
The 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 TypeMethodDescriptionint
Returns the total number of nodes that have been generated in this search since it was created.int
Returns the total number of nodes that have been visited in this search space since it was created.protected abstract SubgraphSpaceNode
Searches the space ofSubgraphSpaceNode
s until a node which represents a solution is found.final Plan
solve()
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:Search
Returns the total number of nodes that have been visited in this search space since it was created.- Specified by:
countVisited
in classSearch
- 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 classSearch
- Returns:
- the number of expanded ndoes
-
solve
Description copied from class:Search
Searches the space until a solution is found. -
findSubgraph
Searches the space ofSubgraphSpaceNode
s until a node which represents a solution is found.- Returns:
- the node representing a solution
-