An Introduction To PDDL: Malte Helmert October 16th, AI Planning 1/15
An Introduction To PDDL: Malte Helmert October 16th, AI Planning 1/15
Malte Helmert
1/15
What is PDDL?
Malte Helmert
2/15
Malte Helmert
3/15
Domain Files
Malte Helmert
4/15
Problem Files
5/15
Running Example
Objects: The two rooms, four balls and two robot arms.
Predicates: Is x a room? Is x a ball? Is ball x inside room y ? Is robot arm x empty? [...]
Initial state: All balls and the robot are in the first room. All robot arms are empty. [...]
Goal specification: All balls must be in the second room.
Actions/Operators: The robot can move between rooms, pick up a ball or drop a ball.
Malte Helmert
6/15
Objects:
Rooms: rooma, roomb
Balls: ball1, ball2, ball3, ball4
Robot arms: left, right
In PDDL:
(:objects rooma roomb
ball1 ball2 ball3 ball4
left right)
Malte Helmert
7/15
Predicates:
ROOM(x)
BALL(x)
GRIPPER(x)
at-robby(x)
at-ball(x, y )
free(x)
carry(x, y )
In PDDL:
(:predicates (ROOM ?x) (BALL ?x) (GRIPPER ?x)
(at-robby ?x) (at-ball ?x ?y)
(free ?x) (carry ?x ?y))
Malte Helmert
8/15
Initial state:
ROOM(rooma) and ROOM(roomb) are true.
BALL(ball1), ..., BALL(ball4) are true.
GRIPPER(left), GRIPPER(right), free(left) and free(right) are true.
at-robby(rooma), at-ball(ball1, rooma), ..., at-ball(ball4, rooma) are true.
Everything else is false.
In PDDL:
(:init (ROOM rooma) (ROOM roomb)
(BALL ball1) (BALL ball2) (BALL ball3) (BALL ball4)
(GRIPPER left) (GRIPPER right) (free left) (free right)
(at-robby rooma)
(at-ball ball1 rooma) (at-ball ball2 rooma)
(at-ball ball3 rooma) (at-ball ball4 rooma))
Malte Helmert
9/15
Goal specification:
at-ball(ball1, roomb), ..., at-ball(ball4, roomb) must be true.
Everything else we dont care about.
In PDDL:
(:goal (and (at-ball
(at-ball
(at-ball
(at-ball
Malte Helmert
ball1
ball2
ball3
ball4
roomb)
roomb)
roomb)
roomb)))
10/15
Action/Operator:
Description:
Precondition:
Effect:
In PDDL:
(:action move :parameters (?x ?y)
:precondition (and (ROOM ?x) (ROOM ?y)
(at-robby ?x))
:effect
(and (at-robby ?y)
(not (at-robby ?x))))
Malte Helmert
11/15
Action/Operator:
Description:
Precondition:
Effect:
In PDDL:
(:action pick-up :parameters (?x ?y ?z)
:precondition (and (BALL ?x) (ROOM ?y) (GRIPPER ?z)
(at-ball ?x ?y) (at-robby ?y) (free ?z))
:effect
(and (carry ?z ?x)
(not (at-ball ?x ?y)) (not (free ?z))))
Malte Helmert
12/15
Action/Operator:
Description:
Malte Helmert
13/15
Malte Helmert
14/15
Questions?
Malte Helmert
15/15