The input to this planner is a domain described in an extended version of the TLPlan domain definition language. These domains are similar to classical TLplan domains but, in addition, they require a definition of -among others- a metric function, and special predicates defining the satisfaction of the individual preferences. The extended TLplan language is not documented (yet), therefore we recommend using the pddl2tlplan translator.
To guide the search, the users can choose from any of 44 pre-defined heuristics, however if they wish to define their own, this can also be done by creating new heuristics, as it is explained below.
hplanp <domain-file> <problem-file> <heuristic>To plan for the problem supplied in domain given as argument. The <heuristic> parameter should be a number between 1 and 44. These heuristics are prioritizations of the different heuristic functions described in [1]. They are currently defined in the preference-heuristics.tlp file.
Based on the value provided by the user, the planner configures the heuristic using the (select-strategy ?s) function, defined in preference-heuristics.tlp. Therefore, if the heuristic argument to hplanp is 14, the OD(0.9) strategy will be used (see preference-heuristics.tlp).
(set-metric-priority <n1>) (set-discounted-metric-priority <n2>) (set-best-relaxed-metric-priority <n3>) (set-preference-distance-priority <n4>) (set-optimistic-metric-priority <n4>)The <n?> parameter is a number between -1 and 4. -1 indicates that the function is not used in the final heuristic. Numbers between 0-4 define the priority if a function is going to be used, with 0 being the highest priority, and 4 the lowest. In addition, the keyword (set-metric-discount <r>) is used to set the discount factor of the D function to <r>.
Example: Suppose we want to extend hplanp-p with a new heuristic OBD(0.4). This heuristic uses G to compare two states and in case of a tie, it uses O, then B and finally D(0.4). We will add this heuristic as heuristic number 45 in the planner.
First we need to add a function that configures the hplan-p priority parameters. Let us assume that this function will be called foo-heuristic. We add the following function to file preference-heuristics.tlp:
(def-defined-predicate (foo-heuristic) (and (set-optimistic-metric-priority 0) (set-best-relaxed-metric-priority 1) (set-discounted-metric-priority 2) (set-metric-discount 0.4) (set-metric-priority -1) (set-preference-distance-priority -1)))Now, to define this heuristics as number 45, we add the following piece of code to the (select-strategy ?s) function:
(implies (= ?s 45) (foo-heuristic))
[2] Plan constraints and preferences for PDDL3.A. Gerevini and D. Long. Technical Report 2005-08-07, Department of Electronics for Automation, University of Brescia, Brescia, Italy, 2005.