/**
 */


import java.util.Queue;


interface 
StateSpaceSearch


  /**
     A solution path is a queue of problem states.  If a solution exists, the
     queue head is an initial state and the queue tail is a goal state.  If
     there is no solution, the queue is empty.
   */

  interface SolutionPath
  extends Queue<Problem.State>


  /**
     Solve the given problem.

     @param problem The problem of interest.

     @return A solution, which may be empty if no solution was found.
   */

  SolutionPath search(Problem problem)


  /**
   */

  interface Comparison

    /**
       Determine if one solution is better than another.

       @param a A solution.
       @param b Another solution.
       @return True iff a is a better solution than b.
     */

    boolean isBetterThan(SolutionPath a, SolutionPath b)


  /**
     Solve the given problem.

     @param problem The problem of interest.

     @param c A comparison to determine if one solution is better than another.

     @return A solution, which may be empty if no solution was found.
   */

  SolutionPath search(Problem problem, Comparison c)


// $Log:$

syntax highlighted by Code2HTML, v. 0.9.1