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
ModifierConstructorDescriptionprotected
AbstractStateHeuristic(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 Condition
getGoal()
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.boolean
Returnstrue
if this heuristic is admissible.protected void
setAdmissible(boolean isAdmissible)
Marks the cost cost heuristic as admissible or not.protected void
Set 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, wait
Methods 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()Returnstrue
if this heuristic is admissible.- Specified by:
isAdmissible
in interfaceStateHeuristic
- 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
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.
-