-
-
Notifications
You must be signed in to change notification settings - Fork 119
Expand file tree
/
Copy pathclean.pddl
More file actions
105 lines (97 loc) · 2.29 KB
/
clean.pddl
File metadata and controls
105 lines (97 loc) · 2.29 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
(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)
(isSink ?x - surface)
(cut ?x - food)
(cooked ?x - food)
(hasSoap ?x - item)
(isClean ?x - item)
)
; 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)
(not (empty ?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 (isSink ?surface))
(isClean ?surface)
(not (cut ?bagel))
)
:effect (and
(cut ?bagel)
(not (isClean ?surface))
)
)
(:action turn_on_stove
:parameters (?stove - surface)
:precondition (and (isStove ?stove) (not (hot ?stove)))
:effect (and
(hot ?stove)
)
)
(:action turn_off_stove
:parameters (?stove - surface)
:precondition (and (hot ?stove) (isStove ?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)
(isClean ?pan)
(not (cooked ?bagel))
))
:effect (and (
(cooked ?bagel)
(not (isClean ?pan))
))
)
(:action add_soap
:parameters (?item - item)
:precondition (and
(not (hasSoap ?item))
)
:effect (and (
(hasSoap ?item)
))
)
(:action clean_surface
:parameters (?sink - surface ?item - item)
:precondition (and
(hasSoap ?item)
(not (isClean ?item))
(isSink ?sink)
(on ?item ?sink)
)
:effect (and (
(not (hasSoap ?item))
(isClean ?item)
))
)
)