Contributors: adamgreen, Jan Dolejsi,
The domain syntax for PDDL2.2 adds very minimal changes to the domain. As with any update to PDDL it introduces new requirements, however, other than that the only new syntax is Derived Predicates, which are defined in a similar way to how actions are defined, and are defined in the same section of the domain file.
(define (domain railways) (:requirements :derived-predicates :timed-initial-literals) (:types train station - object ) (:predicates (train-not-in-use ?t - train) (train-has-guard ?t - train) (train-has-driver ?t - train) (train-usable ?t - train) ) (:functions ... - omitted ) (:durative-action MOVE-TRAIN ... - omitted ) (:derived (train-usable ?t - train) (and (train-has-guard ?t) (train-has-driver ?t) ) ) (:derived ... - omitted ) )
Requirements are similar to import/include statements in programming languages, however as PDDL is a kind of declarative language, it is a
:requirement as a given planner is “required” to facilitate some aspect of the language.
:requirements can be specified through a space separated list e.g.
(:requirements :strips :adl :typing)
This is a list of requirements that were added by PDDL2.2 to the language of PDDL.
(:derived <predicate_name> <logical_expression>)
A derived predicate is declared by naming the predicate who’s result is being derived, and a logical expression which is evaluated to work out the value.
Note, that a derived predicate is declared similarly to actions, in that we use the
:derived keyword for each declaration of a derived predicate.
(:derived (train-usable ?t - train) (and (train-has-guard ?t) (train-has-driver ?t) ) )
The example above specifies that a train is only usable if it has a train and a driver.
- PDDL - The Planning Domain Definition Language, [Ghallab, M. Howe, A. Knoblock, C. McDermott, D. Ram, A. Veloso, M. Weld, D. Wilkins, D.]
- PDDL2.1: An Extension to PDDL for Expressing Temporal Planning Domains, [Fox, M. Long, D.]
- PDDL2.2: The Language for the Classical Part of the 4th International Planning Competition [Edelkamp, S. Hoffmann, J.]
- PDDL Examples
- OPTIC - Optimising Preferences and Time Dependent Costs