Package fr.uga.pddl4j.heuristics.state
Class GraphHeuristic
java.lang.Object
fr.uga.pddl4j.heuristics.AbstractHeuristic
fr.uga.pddl4j.heuristics.state.AbstractStateHeuristic
fr.uga.pddl4j.heuristics.state.GraphHeuristic
- All Implemented Interfaces:
Heuristic
,PlanningGraphHeuristic
,StateHeuristic
,Serializable
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface fr.uga.pddl4j.heuristics.state.StateHeuristic
StateHeuristic.Name
-
Constructor Summary
ModifierConstructorDescriptionprotected
GraphHeuristic(Problem problem)
Creates a new RelaxedGraphHeuristic heuristic. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
expandPlanningGraph(State state)
This method creates the relaxed planning graph from a specified initial state.protected int
Computes the sum heuristic.protected boolean
Returntrue
if the goal is reached in the last proposition level of the expanded planning graph.protected void
Set the goal of the problem to solve in order to compute the heuristic.Methods inherited from class fr.uga.pddl4j.heuristics.state.AbstractStateHeuristic
getActions, getGoal, getRevelantFacts, isAdmissible, setAdmissible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface fr.uga.pddl4j.heuristics.state.StateHeuristic
estimate, estimate, isAdmissible
-
Constructor Details
-
GraphHeuristic
Creates a new RelaxedGraphHeuristic heuristic.- Parameters:
problem
- the problem to be solved.
-
-
Method Details
-
setGoal
Set the goal of the problem to solve in order to compute the heuristic.- Overrides:
setGoal
in classAbstractStateHeuristic
- Parameters:
goal
- the goal.
-
expandPlanningGraph
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()Returntrue
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.
-