Background · PDDL

Planning is Structured: PDDL

blocksworld · domain & problem (PDDL)
(define (domain blocksworld)
 (:predicates (on ?x ?y) (clear ?x)
              (ontable ?x) (holding ?x)
              (handempty))
 (:action stack :parameters (?x ?y)
   :precondition (and (clear ?y) (holding ?x))
   :effect (and (on ?x ?y) (clear ?x)
                (handempty) (not (holding ?x)))))

(define (problem bw-1)
 (:objects a b c)
 (:init (ontable a) (ontable b) (ontable c)
        (clear a) (clear b) (clear c) (handempty))
 (:goal (and (on a b) (on b c))))

Domain

Predicates & actions — precondition → effect.

Problem

Objects, initial state & goal.

Plan

Ordered grounded actions.

Plan executing · Blocksworld Goal reached ✓
C
B
A
goal: (on a b) (on b c)
Resulting state
(on a b)(on b c)(ontable c)(clear a)