Package fr.uga.pddl4j.heuristics.state
Class RelaxedGraphHeuristic
java.lang.Object
fr.uga.pddl4j.heuristics.AbstractHeuristic
fr.uga.pddl4j.heuristics.state.AbstractStateHeuristic
fr.uga.pddl4j.heuristics.state.RelaxedGraphHeuristic
- All Implemented Interfaces:
Heuristic,PlanningGraphHeuristic,StateHeuristic,Serializable
- Direct Known Subclasses:
AdjustedSum,AdjustedSum2,AjustedSum2M,Combo,CriticalPath,FastForward,Max,Sum
public abstract class RelaxedGraphHeuristic
extends AbstractStateHeuristic
implements PlanningGraphHeuristic
This abstract class implements the basic methods used by all heuristics based on the computation
of a relaxed planning graph ignoring negative effects. This implementation is based on the
implementation of the fast forward planner proposed by J. Hoffmann. The relaxed planning computed
does not compute mutual exclusion. To have more information about this implementation see
Hoffmann, J. and Nebel, B. (2001). The FF Planning System: Fast Plan Generation Through Heuristic
Search. Journal of Artificial Intelligence Research, 14(1):253-302.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface fr.uga.pddl4j.heuristics.state.StateHeuristic
StateHeuristic.Name -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRelaxedGraphHeuristic(Problem problem)Creates a new RelaxedGraphHeuristic heuristic. -
Method Summary
Modifier and TypeMethodDescriptionprotected intexpandRelaxedPlanningGraph(State state)This method creates the relaxed planning graph from a specified initial state.protected intCompute the max heuristic.protected intCompute the relaxed plan heuristic value.protected intCompute the sum heuristic.protected booleanReturnstrueif the goal is reachable after the planning graph expansion.protected voidSet the goal of the relaxed problem to solve in order to compute the heuristic.Methods inherited from class fr.uga.pddl4j.heuristics.state.AbstractStateHeuristic
getActions, getGoal, getRevelantFacts, isAdmissible, setAdmissibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.uga.pddl4j.heuristics.state.StateHeuristic
estimate, estimate, isAdmissible
-
Constructor Details
-
RelaxedGraphHeuristic
Creates a new RelaxedGraphHeuristic heuristic.- Parameters:
problem- the problem to be solved.
-
-
Method Details
-
setGoal
Set the goal of the relaxed problem to solve in order to compute the heuristic.- Overrides:
setGoalin classAbstractStateHeuristic- Parameters:
goal- the goal.- Throws:
NullPointerException- ifgoal == null.
-
expandRelaxedPlanningGraph
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.
-
isGoalReachable
protected final boolean isGoalReachable()Returnstrueif the goal is reachable after the planning graph expansion.- Returns:
trueif the goal is reachable after the planning graph expansion;falseotherwise.
-
getSumValue
protected final int getSumValue()Compute the sum heuristic.- Returns:
- the sum heuristic value.
- See Also:
Sum
-
getMaxValue
protected final int getMaxValue()Compute the max heuristic.- Returns:
- max heuristic value.
- See Also:
Max
-
getRelaxedPlanValue
protected final int getRelaxedPlanValue()Compute the relaxed plan heuristic value.- Returns:
- the relaxed plan heuristic value.
- See Also:
FastForward
-