|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DepthLimitedSearch<K extends AgentAction,S extends AgentState>
A tree search with a predetermined depth limit.
Note that this interface is suggested as a modification of tree search, but the algorithm can also be formulated as a recursive depth-first search.
Since the tree-search implementation is more general (could be used with any search strategy), we prefer that one.
Implementations should offer both the general #searchWithDepthLimit method, and a constructor that accepts a particular depth, allowing subsequent calls to the usual #search that will use the predetermined depth.
Method Summary | |
---|---|
int |
getDepth()
Accessor for the preset depth parameter. |
java.util.List<K> |
search(SearchProblem<K,S> theSearchProblem)
Given a formal statement of a problem, returns a sequence of actions that will reach a goal state. |
java.util.List<K> |
searchWithDepthLimit(SearchProblem<K,S> theSearchProblem,
int depth)
Performs a search with the given |
Method Detail |
---|
java.util.List<K> search(SearchProblem<K,S> theSearchProblem) throws SearchFailureException, DepthCutoffSearchFailureException
Uses a predetermined depth limit set at construction time.
search
in interface SearchAlgorithm<K extends AgentAction,S extends AgentState>
theSearchProblem
-
SearchFailureException
DepthCutoffSearchFailureException
java.util.List<K> searchWithDepthLimit(SearchProblem<K,S> theSearchProblem, int depth) throws SearchFailureException, DepthCutoffSearchFailureException
theSearchProblem
-
SearchFailureException
DepthCutoffSearchFailureException
int getDepth()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |