PDDL+
PDDL+, by Maria Fox and Derek Long, describes worlds that change by themselves. Alongside the actions a planner chooses, it adds processes, which run while their conditions hold, and events, which fire when their conditions become true.
Start, process, stop
In PDDL 2.1, change belongs to actions. Water heats because a heating action says so. In PDDL+ the water heats because the heater is on, and it boils whether or not the plan wanted it to. Fox and Long call this the start-process-stop model: "Processes run over time and have a continuous effect on numeric values. They are initiated and terminated either by the direct action of the agent or by events triggered in the world."
This makes planning harder, since a plan has to account for what the world will do. It also models things durative actions cannot, such as a tank that overflows at a time no action decides.
An example
(define (domain courier-plus)
(:requirements :typing :fluents :negative-preconditions :events)
(:types van)
(:predicates
(driving ?v - van)
(arrived ?v - van)
(stranded ?v - van))
(:functions
(position ?v - van)
(charge ?v - van))
; The planner's choices: actions are instantaneous.
(:action set-off
:parameters (?v - van)
:precondition (and (not (driving ?v)) (not (arrived ?v)) (not (stranded ?v)))
:effect (driving ?v))
(:action stop
:parameters (?v - van)
:precondition (and (driving ?v) (>= (position ?v) 100))
:effect (and (not (driving ?v)) (arrived ?v)))
; A process runs whenever its precondition holds.
(:process moving
:parameters (?v - van)
:precondition (driving ?v)
:effect (and (increase (position ?v) (* #t 2))
(decrease (charge ?v) (* #t 1))))
; An event fires as soon as its precondition is true.
(:event battery-flat
:parameters (?v - van)
:precondition (and (driving ?v) (<= (charge ?v) 0))
:effect (and (not (driving ?v)) (stranded ?v))))(define (problem reach-the-harbour)
(:domain courier-plus)
(:objects van1 - van)
(:init
(= (position van1) 0)
(= (charge van1) 60))
(:goal (arrived van1)))With a charge of 60, the van has 60 time units of driving, enough to go 120. The plan is to set off and stop any time after 50 and before the battery runs out. With a charge of 40, the event fires first and the van is stranded: the goal cannot be reached, and no action caused that.
Autoplan does not support PDDL+ processes and events yet, and refuses this file. We have not run this example with any planner: it follows the syntax of Fox and Long's paper. Planners that read PDDL+ include ENHSP, UPMurphi and DiNo. The paper's grammar calls the requirement :events, and published domains also use :time; check what your planner expects.
Rules
- An event looks like an action, but the planner does not choose it, and it must have at least one numeric precondition.
- A process has only continuous effects, using
#t. - PDDL+ builds on the discrete part of PDDL 2.1 with timed initial literals. Derived predicates are not part of it.
What it means formally
The paper gives PDDL+ a semantics by mapping it to hybrid automata, and shows that it is strictly more expressive than PDDL 2.1. Plan existence is equivalent to reachability, which the paper shows is decidable for a restricted class of hybrid automata.
If your problem has continuous change that only actions start and stop, the continuous effects of PDDL 2.1 may be enough, and Autoplan handles those.
Sources
- Maria Fox, Derek Long. Modelling Mixed Discrete-Continuous Domains for Planning. Journal of Artificial Intelligence Research 27, 235-297, 2006.
- Maria Fox, Derek Long. PDDL+: Planning with time and metric resources. Technical Report 21/02, Department of Computer Science, University of Durham, 2002.