|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TreeSearch<K extends AgentAction,S extends AgentState>
A search algorithm which can explore a state space that is a tree, i.e. each state can be reached by only one path (one node).
Implementations should provide a constructor that accepts
a SearchStrategy
, so that subsequent calls to search
with
a new problem will automatically use the specified strategy.
Method Summary | |
---|---|
java.util.Set<SearchNode<K,S>> |
expand(SearchNode<K,S> node,
SearchProblem<K,S> searchProblem)
Returns a set of successor nodes for a given node. |
java.util.List<K> |
solution(SearchNode<K,S> node)
Returns the sequence of actions obtained by following parent pointers back to the root. |
java.util.List<K> |
treeSearch(SearchProblem<K,S> theSearchProblem,
SearchStrategy<K,S> theStrategy)
Executes a search on the given problem using the specified strategy. |
Methods inherited from interface edu.columbia.cs.coms4701.search.SearchAlgorithm |
---|
search |
Method Detail |
---|
java.util.List<K> treeSearch(SearchProblem<K,S> theSearchProblem, SearchStrategy<K,S> theStrategy)
theSearchProblem
- theStrategy
-
java.util.Set<SearchNode<K,S>> expand(SearchNode<K,S> node, SearchProblem<K,S> searchProblem)
In the normal tree-search implementation, this should simply accept the (action,result) pairs from the searchProblem's successor function,
node
- searchProblem
-
java.util.List<K> solution(SearchNode<K,S> node)
node
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |