-
-
Notifications
You must be signed in to change notification settings - Fork 120
/
cook.pddl
67 lines (61 loc) · 1.55 KB
/
cook.pddl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
(define (domain kitchen)
(:requirements :typing)
(:types item surface food)
; Predicates describing the state of the world
(:predicates
(hot ?x - surface)
(on ?x - item ?y - surface)
(empty ?x - surface)
(isPan ?x - surface)
(isStove ?x - surface)
(cut ?x - food)
(cooked ?x - food)
)
; Action to move an item from one surface to another
(:action move
:parameters (?item - item ?from - surface ?to - surface)
:precondition (and (on ?item ?from))
:effect (and
(not (on ?item ?from))
(on ?item ?to)
)
)
; Action to cut the bagel
(:action cut_bagel
:parameters (?bagel - food ?knife - item ?surface - surface)
:precondition (and (on ?bagel ?surface) (on ?knife ?surface) (not (isStove ?surface)) (not (cut ?bagel)))
:effect (and
(cut ?bagel)
)
)
(:action turn_on_stove
:parameters (?stove - surface)
:precondition (and (not (hot ?stove)))
:effect (and
(hot ?stove)
)
)
(:action turn_off_stove
:parameters (?stove - surface)
:precondition (and (hot ?stove))
:effect (and
(not (hot ?stove))
)
)
; Action to cook the bagel
(:action cook_bagel
:parameters (?bagel - food ?stove - surface ?pan - surface)
:precondition (and (
(cut ?bagel)
(hot ?stove)
(isStove ?stove)
(isPan ?pan)
(on ?bagel ?pan)
(on ?pan ?stove)
(not (cooked ?bagel))
))
:effect (and (
(cooked ?bagel)
))
)
)