Package fr.uga.pddl4j.heuristics.state
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
This abstract class implements the basic methods of goal cost heuristics.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface fr.uga.pddl4j.heuristics.state.StateHeuristic
StateHeuristic.Name -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractStateHeuristic(Problem problem)Create a new goal cost heuristic for a specified planning problem. -
Method Summary
Modifier and TypeMethodDescriptionReturns the actions of the relaxed problem to solve in order to compute the heuristic.protected ConditiongetGoal()Returns the goal of the problem to solve in order to compute the heuristic.Returns the relevant facts of the relaxed problem to solve in order to compute the heuristic.booleanReturnstrueif this heuristic is admissible.protected voidsetAdmissible(boolean isAdmissible)Marks the cost cost heuristic as admissible or not.protected voidSet the goal of the relaxed problem to solve in order to compute the heuristic.Methods 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
-
Constructor Details
-
AbstractStateHeuristic
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()Returnstrueif this heuristic is admissible.- Specified by:
isAdmissiblein interfaceStateHeuristic- Returns:
trueif 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
Returns the goal of the problem to solve in order to compute the heuristic.- Returns:
- the goal.
-
setGoal
Set the goal of the relaxed problem to solve in order to compute the heuristic.- Parameters:
goal- the goal.
-
getRevelantFacts
Returns the relevant facts of the relaxed problem to solve in order to compute the heuristic.- Returns:
- the relevant facts.
-
getActions
Returns the actions of the relaxed problem to solve in order to compute the heuristic.- Returns:
- the actions.
-