edu.columbia.cs.coms4701.search
Interface SearchNode<K extends AgentAction,S extends AgentState>

All Known Subinterfaces:
GameNode<K,S>

public interface SearchNode<K extends AgentAction,S extends AgentState>

A bookkeeping data structure used to represent the search tree.

Note that nodes are on particular paths, while states are not.

Also, two different nodes can contain the same world state, if that state is generated via two different search paths.

Version:
0.1

User: aaron Date: Sep 11, 2006 Time: 4:56:14 PM

Author:
aaron@cs
See Also:
"Russell & Norvig p70"

Method Summary
 K getAction()
          Gets the action that was applied to the parent to generate this node.
 int getDepth()
          Returns the number of steps along the path from the initial node to this one.
 SearchNode<K,S> getParentNode()
          Gets the node in the search tree that generated this node.
 double getPathCost()
          Returns the cost, aka g(n), of the path from the initial state to this node.
 S getState()
          Gets the state in the state space to which the node corresponds.
 

Method Detail

getState

S getState()
Gets the state in the state space to which the node corresponds.

Returns:
a state

getParentNode

SearchNode<K,S> getParentNode()
Gets the node in the search tree that generated this node.

Returns:
the parent node

getAction

K getAction()
Gets the action that was applied to the parent to generate this node.

Returns:
an action

getPathCost

double getPathCost()
Returns the cost, aka g(n), of the path from the initial state to this node.

Returns:
cost of the path up to this node

getDepth

int getDepth()
Returns the number of steps along the path from the initial node to this one.

Returns:
depth in the search tree