Revision 18 as of 2014-02-14 13:40:40

Clear message

A heuristic specification is either a newly created heuristic instance or a heuristic that has been defined previously. This page describes how one can specify a new heuristic instance. For re-using heuristics, see Heuristic Predefinitions.

Definitions of properties in the descriptions below:

Additive heuristic

add(cost_type=NORMAL)

Language features supported:

Properties:

Blind heuristic

Returns cost of cheapest action for non-goal states, 0 for goal states

blind(cost_type=NORMAL)

Language features supported:

Properties:

Context-enhanced additive heuristic

cea(cost_type=NORMAL)

Language features supported:

Properties:

Causal graph heuristic

cg(cost_type=NORMAL)

Language features supported:

Properties:

Canonical PDB

The canonical pattern database heuristic is calculated as follows. For a given pattern collection C, the value of the canonical heuristic function is the maximum over all maximal additive subsets A in C, where the value for one subset S in A is the sum of the heuristic values for all patterns in S for a given state.

cpdbs(cost_type=NORMAL, patterns=None, combo=false, max_states=1000000)

Language features supported:

Properties:

FF heuristic

See also Synergy.

ff(cost_type=NORMAL)

Language features supported:

Properties:

Genetic Algorithm PDB

The following paper describes the automated creation of pattern databases with a genetic algorithm. Pattern collections are initially created with a bin-packing algorithm. The genetic algorithm is used to optimize the pattern collections with an objective function that estimates the mean heuristic value of the the pattern collections. Pattern collections with higher mean heuristic estimates are more likely selected for the next generation.

gapdb(pdb_max_size=50000, num_collections=5, num_episodes=30, mutation_probability=0.01, disjoint=false, cost_type=NORMAL)

Note: This pattern generation method uses the zero/one pattern database heuristic.

Implementation Notes

The standard genetic algorithm procedure as described in the paper is implemented in Fast Downward. The implementation is close to the paper.

Language features supported:

Properties:

Goal count heuristic

goalcount(cost_type=NORMAL)

Language features supported:

Properties:

h^m heuristic

hm(m=2, cost_type=NORMAL)

Language features supported:

Properties:

Max heuristic

hmax(cost_type=NORMAL)

Language features supported:

Properties:

iPDB

This pattern generation method is an adaption of the algorithm described in the following paper:

For implementation notes, see also this paper:

ipdb(pdb_max_size=2000000, collection_max_size=20000000, num_samples=1000, min_improvement=10, cost_type=NORMAL)

Note: This pattern generation method uses the canonical pattern collection heuristic.

Implementation Notes

The following will very briefly describe the algorithm and explain the differences between the original implementation from 2007 and the new one in Fast Downward.

The aim of the algorithm is to output a pattern collection for which the Canonical PDB yields the best heuristic estimates.

The algorithm is basically a local search (hill climbing) which searches the "pattern neighbourhood" (starting initially with a pattern for each goal variable) for improving the pattern collection. This is done exactly as described in the section "pattern construction as search" in the paper. For evaluating the neighbourhood, the "counting approximation" as introduced in the paper was implemented. An important difference however consists in the fact that this implementation computes all pattern databases for each candidate pattern rather than using A* search to compute the heuristic values only for the sample states for each pattern.

Also the logic for sampling the search space differs a bit from the original implementation. The original implementation uses a random walk of a length which is binomially distributed with the mean at the estimated solution depth (estimation is done with the current pattern collection heuristic). In the Fast Downward implementation, also a random walk is used, where the length is the estimation of the number of solution steps, which is calculated by dividing the current heuristic estimate for the initial state by the average operator costs of the planning task (calculated only once and not updated during sampling!) to take non-unit cost problems into account. This yields a random walk of an expected lenght of np = 2 * estimated number of solution steps. If the random walk gets stuck, it is being restarted from the initial state, exactly as described in the original paper.

The section "avoiding redundant evaluations" describes how the search neighbourhood of patterns can be restricted to variables that are somewhat relevant to the variables already included in the pattern by analyzing causal graphs. This is also implemented in Fast Downward. The second approach described in the paper (statistical confidence interval) is not applicable to this implementation, as it doesn't use A* search but constructs the entire pattern databases for all candidate patterns anyway. The search is ended if there is no more improvement (or the improvement is smaller than the minimal improvement which can be set as an option), how ever there is no limit of iterations of the local search. This is similar to the techniques used in the original implementation as described in the paper.

Language features supported:

Properties:

Landmark-count heuristic

See also Synergy

lmcount(lm_graph, admissible=false, optimal=false, pref=false, alm=true, cost_type=NORMAL)

Note: to use optimal=true, you must build the planner with USE_LP=1. See LPBuildInstructions.

Optimal search: when using landmarks for optimal search (admissible=true), you probably also want to enable the mpd option of the A* algorithm to improve heuristic estimates

cost_type parameter: only used when admissible=true (see LandmarkGraph)

Language features supported:

Properties:

Landmark-cut heuristic

lmcut(cost_type=NORMAL)

Language features supported:

Properties:

Merge-and-shrink heuristic

Note: The parameter space and syntax for the merge-and-shrink heuristic has changed significantly in August 2011.

merge_and_shrink(merge_strategy=MERGE_LINEAR_CG_GOAL_LEVEL, shrink_strategy=shrink_fh(max_states=50000, max_states_before_merge=50000, shrink_f=high, shrink_h=low), reduce_labels=true, expensive_statistics=false, cost_type=NORMAL)

shrink_fh(max_states=N)

shrink_bisimulation(max_states=infinity, threshold=1, greedy=true, initialize_by_h=false, group_by_h=false)

shrink_bisimulation(max_states=N, greedy=false, initialize_by_h=true, group_by_h=true)

Language features supported:

Properties:

Pattern database heuristic

TODO

pdb(cost_type=NORMAL, max_states=1000000, pattern=None)

Language features supported:

Properties:

Zero-One PDB

The zero/one pattern database heuristic is simply the sum of the heuristic values of all patterns in the pattern collection. In contrast to the canonical pattern database heuristic, there is no need to check for additive subsets, because the additivity of the patterns is guaranteed by action cost partitioning. This heuristic uses the most simple form of action cost partitioning, i.e. if an operator affects more than one pattern in the collection, its costs are entirely taken into account for one pattern (the first one which it affects) and set to zero for all other affected patterns.

zopdbs(cost_type=NORMAL, patterns=None, combo=false, max_states=1000000)

Language features supported:

Properties: