Package edu.uky.ai.planning
Class Search
java.lang.Object
edu.uky.ai.planning.Search
- Direct Known Subclasses:
PlanGraphSearch
,PlanSpaceSearch
,StateSpaceSearch
,SubgraphSearch
A search is the process of exploring some space while looking for solutions
to a problem. There are many different kinds of search spaces. Note that
if a search space contains any solutions it probably contains many
solutions, so this class provides ways to get one solution after another.
- Author:
- Stephen G. Ware
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SearchBudget
The search budget for this problemfinal Problem
The problem being solved -
Constructor Summary
ConstructorsConstructorDescriptionSearch
(Problem problem, SearchBudget budget) Constructs a new search for the given problem. -
Method Summary
Modifier and TypeMethodDescriptionabstract int
Returns the total number of nodes that have been generated in this search since it was created.abstract int
Returns the total number of nodes that have been visited in this search space since it was created.abstract Plan
solve()
Searches the space until a solution is found.
-
Field Details
-
problem
The problem being solved -
budget
The search budget for this problem
-
-
Constructor Details
-
Search
Constructs a new search for the given problem.- Parameters:
problem
- the problem to be solvedbudget
- the search budget
-
-
Method Details
-
countVisited
public abstract int countVisited()Returns the total number of nodes that have been visited in this search space since it was created.- Returns:
- the number of visited nodes
-
countGenerated
public abstract int countGenerated()Returns the total number of nodes that have been generated in this search since it was created.- Returns:
- the number of expanded ndoes
-
solve
Searches the space until a solution is found.- Returns:
- the solution found
-