search
Interface NodeInfo


public interface NodeInfo

Searches will use NodeInfo objects to gain application-specific information about a node needed to carry out the search. The search may need to know if it is a goal node, whether it satisfies conditions that allow that path to be terminated, and what the utility or estimated utility of the node is.

Since it is application specific the implementation of NodeInfo should reside with the agent or application domain classes and not in the search package.

Not all searches will use all methods of NodeInfo, in which case dummy values can be returned.

Author:
Cara MacNish

Method Summary
 double getDepthLimit()
          Get the depth/cost limit for depth limited and iterative deepening searches.
 boolean isGoal(Node node)
           
 boolean isTerminal(Node node)
           
 void setDepthLimit(double limit)
          Set the depth/cost limit for depth limited and iterative deepending searches.
 double utility(Node node)
           
 

Method Detail

isGoal

boolean isGoal(Node node)
Returns:
true if this node is a goal node.

isTerminal

boolean isTerminal(Node node)
Returns:
true in cases where the search should terminate

utility

double utility(Node node)
Returns:
the utility or estimated utility (evalutation function) of the node

setDepthLimit

void setDepthLimit(double limit)
Set the depth/cost limit for depth limited and iterative deepending searches.

Parameters:
limit - the depth limit

getDepthLimit

double getDepthLimit()
Get the depth/cost limit for depth limited and iterative deepening searches.

Returns:
the depth limit