Class Max
- 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 max costs of individual atoms:
- hmax(C) = max gs(r) for all r in C (max costs)
The max heuristic unlike the additive heuristic SUM_ID is admissible as the cost of achieving a set of atoms cannot be lower than the cost of achieving each of the atoms in the set. On the other hand, the max heuristic is often less informative. In fact, while the additive heuristic combines the costs of all subgoals, the max heuristic focuses only on the most difficult subgoals ignoring all others.
Warning: The max 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
-
Max
Creates a newMAX
heuristic for a specified planning problem.- Parameters:
problem
- the planning problem.- Throws:
NullPointerException
- ifproblem == null
.
-
-
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.
- Throws:
NullPointerException
- ifstate == null && goal == 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.
-