|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectSearchNode
public abstract class SearchNode
SearchNode.java - a simple node for uninformed AI search (assuming cost equals depth).
| Field Summary | |
|---|---|
int |
depth
variable depth - search depth; 0 at the root
search node; a child node has its parent node depth + 1. |
SearchNode |
parent
variable parent - parent search node; null if and
only if node is the root of the search tree. |
| Constructor Summary | |
|---|---|
SearchNode()
Creates an SearchNode instance and sets it to an
initial search state. |
|
| Method Summary | |
|---|---|
abstract java.util.Vector |
expand()
expand - return a (possibly empty) Vector of this
node's children. |
abstract boolean |
isGoal()
isGoal - test whether or not the current node is a
goal node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public SearchNode parent
parent - parent search node; null if and
only if node is the root of the search tree.
public int depth
depth - search depth; 0 at the root
search node; a child node has its parent node depth + 1.
| Constructor Detail |
|---|
public SearchNode()
SearchNode instance and sets it to an
initial search state. One will generally want to override this
constructor to initialize a root node for search.
| Method Detail |
|---|
public abstract boolean isGoal()
isGoal - test whether or not the current node is a
goal node.
boolean value - whether or not the
current node is a goal nodepublic abstract java.util.Vector expand()
expand - return a (possibly empty) Vector of this
node's children. A new child is created by calling
childClone and appropriately modifying the state
of the returned node.
Vector of SearchNodes that are children
of this node
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||