Package edu.uky.ai.planning.ss
Class ForwardSearch
java.lang.Object
edu.uky.ai.planning.Search
edu.uky.ai.planning.ss.StateSpaceSearch
edu.uky.ai.planning.ss.ForwardSearch
Represents a forward search through the space of states, starting at the
initial state and ending in any state where the goal is achieved. In the
graph defined by this search,
nodes
are states and edges
are steps
.- Author:
- Stephen G. Ware
-
Field Summary
FieldsFields inherited from class edu.uky.ai.planning.ss.StateSpaceSearch
problem
-
Constructor Summary
ConstructorsConstructorDescriptionForwardSearch
(StateSpaceProblem problem, SearchBudget budget) Creates a forward 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
-
ForwardSearch
Creates a forward 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
-