Class GreedyBestFirstSearch

All Implemented Interfaces:
SearchStrategy, StateSpaceSearch, Serializable

public final class GreedyBestFirstSearch extends AbstractStateSpaceSearch
This class implements Greedy Best First Search strategy.
See Also:
Serialized Form
  • Constructor Details

    • GreedyBestFirstSearch

      public GreedyBestFirstSearch()
      Creates a new Greedy best First Search search strategy with default parameters.
    • GreedyBestFirstSearch

      public GreedyBestFirstSearch(int timeout, StateHeuristic.Name heuristic, double weight)
      Creates a new Greedy best First Search search strategy.
      timeout - the time out of the planner.
      heuristic - the heuristic to use to solve the planning problem.
      weight - the weight set to the heuristic.
  • Method Details

    • search

      public Node search(Problem codedProblem)
      The greedy best first search algorithm. Solves the planning problem and returns the first solution plan found. This method must be completed.
      codedProblem - the problem to be solved. The problem cannot be null.
      a solution plan or null if it does not exist.