core
Interface TreeProblem<T>
- Type Parameters:
T
- the type of the states used throughout the search
- All Superinterfaces:
- Problem<T>
- All Known Subinterfaces:
- HeuristicProblem<T>
public interface TreeProblem<T>
- extends Problem<T>
This is the base of all problems which can be solved in a tree based search.
Additional to the simple Problem a TreeProblem consists of a method to check how deep
a given state is in the search tree.
If you implement this interface, your problem can additionally be solved by the following search algorithms:
- basic.DepthLimitedSearch
- basic.IterativDeepeningSearch
- Author:
- eden06
- See Also:
Problem
Method Summary |
int |
depth(T state)
Returns the depth of the given state in the search tree. |
depth
int depth(T state)
- Returns the depth of the given state in the search tree.
Note: Only initial states should have a depth of 0.
- Parameters:
state
- the state to be inspected
- Returns:
- a positive integer indicating the depth of a state.