Class FastForward
- All Implemented Interfaces:
Heuristic
,PlanningGraphHeuristic
,StateHeuristic
,Serializable
The computation of the value returned by the heuristics is based on the extraction of a relaxed plan to the planning graph ignoring negative effects according to the difficulty heuristic. The heuristic value is the number of actions of the relaxed plan extracted. To select an effect according to the unconditional operators difficulty heuristic, the question is, which achiever should be choose when no NOOP is available ? It is certainly a good idea to select an achiever whose preconditions seems to be "easy". From the graph building_the_library.rst phase, we can obtain a simple measure for the operators_difficulty of an action's preconditions as follows:
difficulty(o) := SUM_ID(min { i | p is member of the fact layer at time i }) with p in pre(o)
The operators_difficulty of each action can be set when it is first inserted into the graph. During plan extraction, facing a fact for which no NOOP is available, we then simply selected an achieving action with minimal operators_difficulty. This heuristic works well in situation where there are severals ways to achieve one fact. but some ways need less effort than others.
Warning: The relaxed plan heuristic is not 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
ConstructorDescriptionFastForward(Problem problem)
Creates a newFF
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
-
FastForward
Creates a newFF
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.
-