Package fr.uga.pddl4j.heuristics.state
Interface StateHeuristic
- All Superinterfaces:
Heuristic
,Serializable
- All Known Subinterfaces:
PlanningGraphHeuristic
- All Known Implementing Classes:
AbstractStateHeuristic
,AdjustedSum
,AdjustedSum2
,AjustedSum2M
,Combo
,CriticalPath
,FastForward
,GraphHeuristic
,Max
,RelaxedGraphHeuristic
,SetLevel
,Sum
,SumMutex
This interface defines the methods accessible from all goal cost heuristics. An goal cost heuristic is a function
that estimates the remaining distance to the goal. In order to find this estimation an heuristic
function tries to solve a relaxed problem.
To have an good overview of the planning heuristics developed in this package see D. Bryce and S. Kambhampati. "A Tutorial on Planning Graph Based Reachability Heuristics", 2006.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Return the estimated distance to the goal to reach the specified state.int
Return the estimated distance to the goal to reach the specified state.static StateHeuristic
getInstance(StateHeuristic.Name name, Problem problem)
Create an instance of a goal cost heuristic for a specified problem.boolean
Returnstrue
if this heuristic is admissible.
-
Method Details
-
estimate
Return the estimated distance to the goal to reach the specified state. If the return value isInteger.MAX_VALUE
, it means that the goal is unreachable from the specified state.- Parameters:
state
- the state from which the distance to the goal must be estimated.goal
- the goal expression.- Returns:
- the distance to the goal state from the specified state.
-
estimate
Return the estimated distance to the goal to reach the specified state. If the return value isInteger.MAX_VALUE
, it means that the goal is unreachable from the specified state.- Parameters:
node
- the ndoe from which the distance to the goal must be estimated.goal
- the goal expression.- Returns:
- the distance to the goal state from the specified state.
-
isAdmissible
boolean isAdmissible()Returnstrue
if this heuristic is admissible.- Returns:
true
if this heuristic is admissible.
-
getInstance
Create an instance of a goal cost heuristic for a specified problem.- Parameters:
name
- the name of the heuristic to create.problem
- the problem for which the heuristic is created.- Returns:
- the heuristic created.
-