|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Searcher
public abstract class Searcher
Searcher.java - a superclass for AI searcher classes.
Constructor Summary | |
---|---|
Searcher()
|
Method Summary | |
---|---|
SearchNode |
getGoalNode()
getGoalNode - Returns a goal node if the previous
search was successful, and null otherwise. |
int |
getNodeCount()
getNodeCount - Returns the number of nodes
examined (goal-checked) in the previous search. |
void |
printGoalPath()
printGoalPath - If the previous search was
successful, print each node along the goal path in sequence
starting with the root node. |
abstract boolean |
search(SearchNode node)
search - Search for a goal node starting at the
given "root" SearchNode, and return whether or not a goal node
was found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Searcher()
Method Detail |
---|
public abstract boolean search(SearchNode node)
search
- Search for a goal node starting at the
given "root" SearchNode, and return whether or not a goal node
was found.
node
- a SearchNode
value - the initial
"root" search node
boolean
value - whether or not a goal
node was foundpublic SearchNode getGoalNode()
getGoalNode
- Returns a goal node if the previous
search was successful, and null otherwise.
SearchNode
value - the goal node from
previous search or null if no goal node was foundpublic int getNodeCount()
getNodeCount
- Returns the number of nodes
examined (goal-checked) in the previous search.
int
value - the number of nodes checked
in the previous search. This may be considerably less than the
number of children generated.public void printGoalPath()
printGoalPath
- If the previous search was
successful, print each node along the goal path in sequence
starting with the root node. Otherwise, print "Goal node not
found".
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |