Class AjustedSum2M

All Implemented Interfaces:
Heuristic, PlanningGraphHeuristic, StateHeuristic, Serializable

public final class AjustedSum2M extends RelaxedGraphHeuristic
This class implement the adjusted sum 2M heuristic. This heuristic improves the adjusted sum 2 heuristic by replacing the computation of the interaction degree of the of the adjusted sum 2 heuristic. Now, we have the following heuristic:
 hadjsum2M(S) := cost(S) + delta(S)
 
where
  • cost(S) := 1 + cost(S + prec(a) - add(a))
  • delta(S) := max(lev({p, q} - max{levl(p), level(q)})for all p in S

Note that computing delta(S) is equivalent to compute the set level heuristic.

Warning: The adjusted sum 2M heuristic is not admissible.
See Also:
AdjustedSum, Max, FastForward, Sum, Serialized Form
  • Constructor Details

    • AjustedSum2M

      public AjustedSum2M(Problem problem)
      Creates a new AJUSTED_SUM2M heuristic for a specified planning problem.
      Parameters:
      problem - the planning problem.
      Throws:
      NullPointerException - if problem == null.
  • Method Details

    • estimate

      public int estimate(State state, Condition goal)
      Return the estimated distance to the goal to reach the specified state. If the return value is Integer.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

      public double estimate(Node node, Condition goal)
      Return the estimated distance to the goal to reach the specified state. If the return value is DOUBLE.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.