ai.search
Class Search

java.lang.Object
  extended byai.search.Search

public class Search
extends java.lang.Object

The general search function along with set of specific search strategies.

Author:
Jill Zimmerman -- jill.zimmerman@goucher.edu

Field Summary
 int limit
          A depth limit.
 int maxExpanded
          The maximum number of nodes to expand.
 java.util.Vector nodeTable
          A list of expanded nodes.
 Problem problem
          The search problem.
 
Constructor Summary
Search(Problem p, int m)
          Construct a search.
 
Method Summary
 Node execute(java.lang.String algorithm)
          Execute the search with the given algorithm.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

problem

public Problem problem
The search problem.


maxExpanded

public int maxExpanded
The maximum number of nodes to expand.


nodeTable

public java.util.Vector nodeTable
A list of expanded nodes.


limit

public int limit
A depth limit.

Constructor Detail

Search

public Search(Problem p,
              int m)
Construct a search.

Parameters:
p - is a search problem
m - is the maximum nodes to be expanded.
Method Detail

execute

public Node execute(java.lang.String algorithm)
Execute the search with the given algorithm.