Package edu.uky.ai.planning.ss
Class BackwardSearch
java.lang.Object
edu.uky.ai.planning.Search
edu.uky.ai.planning.ss.StateSpaceSearch
edu.uky.ai.planning.ss.BackwardSearch
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 Summary
FieldsFields inherited from class edu.uky.ai.planning.ss.StateSpaceSearch
problem
-
Constructor Summary
ConstructorsConstructorDescriptionBackwardSearch
(StateSpaceProblem problem, SearchBudget budget) Creates a backward state space search for a given problem. -
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.
-
Field Details
-
root
The root node of the search space (i.e. a plan with 0 steps)
-
-
Constructor Details
-
BackwardSearch
Creates a backward state space search for a given problem.- Parameters:
problem
- the problem whose state space will be searchedbudget
- 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 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
-