Class Sum
- All Implemented Interfaces:
Heuristic
,PlanningGraphHeuristic
,StateHeuristic
,Serializable
The principle of this heuristics function h is to resolved a relaxed the planning problem P' in which all delete list are ignored. The cost of achieving an atom p form the state s is noted gs(p). These estimates can be defined recursively as:
- gs(p) = 0, if p is in s,
- gs(p) = min[1 + gs(Prec(op))] for each op in O(p), otherwise
where O(p) stands for the actions op that add p, i.e., with p in Add(op), and gs(Prec(op)), to be defined below, stands for the estimated cost of achieving the preconditions of action op from s. The cost gs(C) of a sets of atoms is defined as the weighted sum of the costs of individual atoms:
- hsum(C) = sum gs(r) for all r in C (additive costs)
The heuristic assumes that subgoals are independent. This is not true in general as the achievement of some subgoals can make the achievement of the other subgoals more or less difficult. For this reason, the additive heuristic is not admissible (i.e., it may overestimate the true costs).
Warning: The sum heuristic is admissible.- See Also:
RelaxedGraphHeuristic
, Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface fr.uga.pddl4j.heuristics.state.StateHeuristic
StateHeuristic.Name
-
Constructor Summary
-
Method Summary
Methods inherited from class fr.uga.pddl4j.heuristics.state.RelaxedGraphHeuristic
expandRelaxedPlanningGraph, getMaxValue, getRelaxedPlanValue, getSumValue, isGoalReachable, setGoal
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
isAdmissible
-
Constructor Details
-
Sum
Creates a newSUM_ID
heuristic for a specified planning problem.- Parameters:
problem
- the planning problem.- Throws:
NullPointerException
- ifproblem == null
.
-
-
Method Details
-
estimate
Return the distance to the goal state from the specified state. If the return value isInteger.MAX_VALUE
, it means that the goal is unreachable from the specified state. More precisely, this method returns the level of the planning graph where all the propositions of the goal are reached without any mutex orInteger.MAX_VALUE
otherwise.- 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 or
Integer.MAX_VALUE
if the goal is unreachable from the specified state. - Throws:
NullPointerException
- ifstate == null
.
-
estimate
Return the estimated distance to the goal to reach the specified state. If the return value isDOUBLE.MAX_VALUE
, it means that the goal is unreachable from the specified state.- Parameters:
node
- 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.
-