Overview

Hplan-P [1] is a heuristic planner for problems with both hard goals and temporally extended preferences, described in the PDDL3 [2] language. It is an extension to the TLPlan planning system. It obtained a distinguished performance award in the 5th International Planning Competition. The rest of this page describes hplan-p's modules and gives an overview of its use. For more details about the algorithms and theoretical properties, please see [1].

Modules

Hplan-p is an extension to the TLPlan system. It is comprised by the modules described in the following section.

Extended version of TLPlan

This is an enhanced version of TLPLan that can plan for problems that contain preferences. One of the most important features of the planner is that it is able to compute domain-independent heuristics for both standard goals and preferences. In particular it is able to compute the G, P, B, and D(r) functions described in [1].

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.

PDDL2TLPlan translator

This program takes a PDDL3 domain description and problem description and generates a problem file in the TLPlan extended domain language. The preprocessing phase described in [1] is done by the translator; this means that temporally extended preferences are transformed into Parameterized Nondeterministic Finite Automata (PNFA) in this phase. This transformation is essential to applying heuristics in a more straightforward way.

Incremental Search Algorithm & Heuristics

Although the extended TLPlan system is able to compute most of the heuristics functions, the actual search algorithm is not part of TLPlan. Indeed, the incremental search algorithm is implemented in the TLPlan language. In the current HPlan-P distribution, it can be found in the isearch_new.tlp file.

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.

Using HPlan-P

Run the hplanp script in the following way:
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).

Configuring new heuristics

As described in [1], the hplanp-p planner internally implements a set of 5 functions that can be combined as a prioritization to guide the search of the planner. To define a new heuristics one needs only to define the priorities of the 5 different functions. Priorities are defined using the keywords that follow (functions being prioritized should be obvious in the context of [1])
(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))

Installation

To be completed...

References

[1] A Heuristic Search Approach to Planning with Temporally Extended Preferences, Baier, J. and Bacchus, F. and McIlraith, S., 2007 Proceedings of the Twentieth International Joint Conference on Artificial Intelligence (IJCAI-07), pp. 1808-1815, January , Hyderabad, India

[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.