PDDL 1.2

PDDL 1.2 is the first public version of the language, written for the 1998 planning competition by a committee chaired by Drew McDermott. It gave planners a shared way to say what they had long been saying differently.

The manual describes a language with "roughly the expressiveness of Pednault's ADL for propositions", and credits earlier systems, most directly the UCPOP formalism. It covered basic STRIPS actions, conditional effects, universal quantification, domain axioms, safety constraints and hierarchical actions.

STRIPS with types

The core of the language, and still the part every planner reads: an action is a precondition that is a set of facts, and an effect that adds and deletes facts. The flag :typing adds types.

demos/pddl-guide/courier/domain.pddl
; A van carries parcels along roads. PDDL 1.2: STRIPS with types.
(define (domain courier)
  (:requirements :strips :typing)
  (:types van parcel location)
  (:predicates
    (road ?from ?to - location)
    (van-at ?v - van ?l - location)
    (parcel-at ?p - parcel ?l - location)
    (in ?p - parcel ?v - van))

  (:action drive
    :parameters (?v - van ?from ?to - location)
    :precondition (and (van-at ?v ?from) (road ?from ?to))
    :effect (and (not (van-at ?v ?from)) (van-at ?v ?to)))

  (:action load
    :parameters (?p - parcel ?v - van ?l - location)
    :precondition (and (van-at ?v ?l) (parcel-at ?p ?l))
    :effect (and (not (parcel-at ?p ?l)) (in ?p ?v)))

  (:action unload
    :parameters (?p - parcel ?v - van ?l - location)
    :precondition (and (van-at ?v ?l) (in ?p ?v))
    :effect (and (not (in ?p ?v)) (parcel-at ?p ?l))))
demos/pddl-guide/courier/problem.pddl
; Two parcels at the depot, one for the market, one for the harbour.
(define (problem two-parcels)
  (:domain courier)
  (:objects
    van1 - van
    book lamp - parcel
    depot market harbour - location)
  (:init
    (van-at van1 depot)
    (parcel-at book depot)
    (parcel-at lamp depot)
    (road depot market) (road market depot)
    (road market harbour) (road harbour market))
  (:goal (and (parcel-at book market) (parcel-at lamp harbour))))

ADL

The flag :adl stands for all of :strips, :typing, :disjunctive-preconditions, :equality, :quantified-preconditions and :conditional-effects. Conditions can then use or, not, exists and forall, and effects can use when and forall. One action can do what would otherwise take a family of them.

demos/pddl-guide/courier-adl/domain.pddl
; PDDL 1.2 with :adl: quantifiers, negative conditions and conditional
; effects. One action empties the whole van wherever it stands.
(define (domain courier-adl)
  (:requirements :adl)
  (:types van parcel location)
  (:predicates
    (road ?from ?to - location)
    (van-at ?v - van ?l - location)
    (parcel-at ?p - parcel ?l - location)
    (in ?p - parcel ?v - van)
    (closed ?l - location))

  (:action drive
    :parameters (?v - van ?from ?to - location)
    :precondition (and (van-at ?v ?from) (road ?from ?to) (not (closed ?to)))
    :effect (and (not (van-at ?v ?from)) (van-at ?v ?to)))

  ; Every parcel at this location goes into the van.
  (:action load-all
    :parameters (?v - van ?l - location)
    :precondition (and (van-at ?v ?l)
                       (exists (?p - parcel) (parcel-at ?p ?l)))
    :effect (forall (?p - parcel)
              (when (parcel-at ?p ?l)
                    (and (not (parcel-at ?p ?l)) (in ?p ?v)))))

  ; Every parcel in the van is put down here.
  (:action unload-all
    :parameters (?v - van ?l - location)
    :precondition (van-at ?v ?l)
    :effect (forall (?p - parcel)
              (when (in ?p ?v)
                    (and (not (in ?p ?v)) (parcel-at ?p ?l))))))
demos/pddl-guide/courier-adl/problem.pddl
(define (problem everything-to-the-harbour)
  (:domain courier-adl)
  (:objects
    van1 - van
    book lamp chair - parcel
    depot market bridge harbour - location)
  (:init
    (van-at van1 depot)
    (parcel-at book depot) (parcel-at lamp depot) (parcel-at chair market)
    (road depot market) (road market depot)
    (road depot bridge) (road bridge harbour)
    (road market harbour) (road harbour market)
    (closed bridge))
  ; A universally quantified goal: every parcel, however many there are.
  (:goal (forall (?p - parcel) (parcel-at ?p harbour))))

Autoplan solves this with load-all and unload-all in five steps, going round the closed bridge.

All the requirement flags

The manual lists twenty: :strips, :typing, :disjunctive-preconditions, :equality, :existential-preconditions, :universal-preconditions, :quantified-preconditions, :conditional-effects, :action-expansions, :foreach-expansions, :dag-expansions, :domain-axioms, :subgoal-through-axioms, :safety-constraints, :expression-evaluation, :fluents, :open-world, :true-negation, :adl and :ucpop.

What was and was not used

Much of the language was never exercised. The AIPS 2000 competition restricted itself to the requirement flags :strips and :adl, with typing. According to Fox and Long, the hierarchical part "has never been successfully explored", and Edelkamp and Hoffmann note that axioms were never used in a competition benchmark before PDDL 2.2 brought them back as derived predicates.

PDDL 1.2 does have a :fluents flag, but it is not the numeric fluents of today. It describes a term with a time-varying value and a different syntax, which the 1998 and 2000 competitions did not use. PDDL 2.1 replaced it.

There is also no :negative-preconditions flag in the 1.2 table. That appears in the requirements of PDDL 2.1.

Sources

  1. Drew McDermott, Malik Ghallab, Adele Howe, Craig Knoblock, Ashwin Ram, Manuela Veloso, Daniel Weld, David Wilkins. PDDL: The Planning Domain Definition Language, Version 1.2. Technical Report CVC TR-98-003, Yale Center for Computational Vision and Control, 1998.
  2. Drew McDermott. The 1998 AI Planning Systems Competition. AI Magazine 21(2), 35-55, 2000.
  3. Fahiem Bacchus. Subset of PDDL for the AIPS2000 Planning Competition. Draft, 2000.