Class GraphHeuristic

All Implemented Interfaces:
Heuristic, PlanningGraphHeuristic, StateHeuristic, Serializable
Direct Known Subclasses:
SetLevel, SumMutex

public abstract class GraphHeuristic extends AbstractStateHeuristic implements PlanningGraphHeuristic
This abstract class implements the basic methods used by all heuristics based on the computation of a planning graph with mutual exclusions.

This implementation is based on the implementation of the STAN planner proposed D. Long and M. Fox. To have more information about this implementation see D. Long, M. Fox (1999). Efficient Implementation of the Plan Graph in STAN. Journal of Artificial Intelligence Research, 10(1):87-115.

See Also:
Serialized Form
  • Constructor Details

    • GraphHeuristic

      protected GraphHeuristic(Problem problem)
      Creates a new RelaxedGraphHeuristic heuristic.
      Parameters:
      problem - the problem to be solved.
  • Method Details

    • setGoal

      protected final void setGoal(Condition goal)
      Set the goal of the problem to solve in order to compute the heuristic.
      Overrides:
      setGoal in class AbstractStateHeuristic
      Parameters:
      goal - the goal.
    • expandPlanningGraph

      protected final int expandPlanningGraph(State state)
      This method creates the relaxed planning graph from a specified initial state.
      Parameters:
      state - the initial state of the relaxed planning graph.
      Returns:
      the level of the graph built.
    • getSumValue

      protected final int getSumValue()
      Computes the sum heuristic.
      Returns:
      the sum heuristic value.
      See Also:
      Sum
    • isGoalReachable

      protected final boolean isGoalReachable()
      Return true if the goal is reached in the last proposition level of the expanded planning graph.
      Returns:
      true if the goal is reached in the last proposition level of the expanded planning graph; false otherwise.