Package fr.uga.pddl4j.heuristics.state
Class AdjustedSum2
java.lang.Object
fr.uga.pddl4j.heuristics.AbstractHeuristic
fr.uga.pddl4j.heuristics.state.AbstractStateHeuristic
fr.uga.pddl4j.heuristics.state.RelaxedGraphHeuristic
fr.uga.pddl4j.heuristics.state.AdjustedSum2
- All Implemented Interfaces:
Heuristic
,PlanningGraphHeuristic
,StateHeuristic
,Serializable
This class implement the adjusted sum 2 heuristic. This heuristic improves the adjusted sum
heuristic by replacing the computation of the
cost(S)
by the used the relaxed plan
heuristic. Now, we have the following heuristic:
hadjsum2(S) := cost(S) + delta(S)where
-
cost(S) := 1 + cost(S + prec(a) - add(a))
-
delta(S) := lev(S) - max(lev(p))
for allp
inS
- See Also:
AdjustedSum
,Max
,FastForward
,Sum
, Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface fr.uga.pddl4j.heuristics.state.StateHeuristic
StateHeuristic.Name
-
Constructor Summary
ConstructorDescriptionAdjustedSum2(Problem problem)
Creates a newAdjustedSum2
heuristic for a specified planning problem. -
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
-
AdjustedSum2
Creates a newAdjustedSum2
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.
-
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.
-