|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type of the states used throughout the searchpublic interface Problem<T>
This is the base of all problems which can be solved with the Search framework.
A simple Problem consists of a starting state, a test if a state is a goal or not and
a way to generate the successor states of a known state.
If you implement this interface, your problem can be solved by the following search algorithms:
DepthFirstSearch
,
BreadthFirstSearch
,
SlowDepthFirstSearch
Method Summary | |
---|---|
java.util.List<T> |
expand(T state)
Generates all successor states of the given state. |
T |
initial()
Returns the starting state of the search. |
boolean |
isGoal(T state)
Checks whether a given state is a goal of the search or not. |
Method Detail |
---|
T initial()
boolean isGoal(T state)
state
- to be checked
java.util.List<T> expand(T state)
state
- to be expanded
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |