Package search

A generic implementation of several of the graph search algorithms discussed in Russell and Norvig. The heart of this implementation is class GraphSearcher, which implements the GraphSearch algorithm of Russell and Norvig in its general form. The specific behaviors of the frontier, the explored set, checking for goal nodes, etc. are provided through the generic type arguments, and through the behaviors passed as constructor arguments. However the GraphSearcher class is a bit abstract, and so there are specialized versions of it for common algorithms and purposes.
  • The AStarSearcher class fixes the operation of the search frontier for the A* algorithm.

    This class has two further specializations: AStarSearcher.SimpleNodes with minimal search tree nodes containing only the underlying state and its cost, and AStarSearcher.PathNodes with nodes also each containing a backlink to its parent.

  • The BreadthFirstSearcher class fixes the operation of the search frontier for the breadth-first search algorithm.