Class AbstractStateHeuristic

java.lang.Object
fr.uga.pddl4j.heuristics.AbstractHeuristic
fr.uga.pddl4j.heuristics.state.AbstractStateHeuristic
All Implemented Interfaces:
Heuristic, StateHeuristic, Serializable
Direct Known Subclasses:
GraphHeuristic, RelaxedGraphHeuristic

public abstract class AbstractStateHeuristic extends AbstractHeuristic implements StateHeuristic
This abstract class implements the basic methods of goal cost heuristics.
See Also:
Serialized Form
  • Constructor Details

    • AbstractStateHeuristic

      protected AbstractStateHeuristic(Problem problem)
      Create a new goal cost heuristic for a specified planning problem. By default the heuristic is considered as admissible.
      Parameters:
      problem - the problem to solve.
  • Method Details

    • isAdmissible

      public boolean isAdmissible()
      Returns true if this heuristic is admissible.
      Specified by:
      isAdmissible in interface StateHeuristic
      Returns:
      true if this heuristic is admissible.
    • setAdmissible

      protected final void setAdmissible(boolean isAdmissible)
      Marks the cost cost heuristic as admissible or not.
      Parameters:
      isAdmissible - the admissible flag.
    • getGoal

      protected final Condition getGoal()
      Returns the goal of the problem to solve in order to compute the heuristic.
      Returns:
      the goal.
    • setGoal

      protected void setGoal(Condition goal)
      Set the goal of the relaxed problem to solve in order to compute the heuristic.
      Parameters:
      goal - the goal.
    • getRevelantFacts

      protected final List<Fluent> getRevelantFacts()
      Returns the relevant facts of the relaxed problem to solve in order to compute the heuristic.
      Returns:
      the relevant facts.
    • getActions

      protected final List<Action> getActions()
      Returns the actions of the relaxed problem to solve in order to compute the heuristic.
      Returns:
      the actions.