-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidekick-domain-3.pddl
More file actions
202 lines (185 loc) · 5.62 KB
/
sidekick-domain-3.pddl
File metadata and controls
202 lines (185 loc) · 5.62 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
;Header and description
(define (domain maintenance-domain-gobjects)
;I set it to use durative actions so I can have at start and at end things
(:requirements :durative-actions :typing :numeric-fluents :timed-initial-literals)
(:types
egobot sidekick - robot
location
panel
patch welder - tool
)
(:functions
(ingoal ?pn - panel)
(pagoal ?l - location)
(wegoal ?l - location)
(score)
)
;camera-free restricts the robots to only one inspect, patch, weld, pick-up, or drop action at a time
;hands-free restricts the robots to carrying only one tool at a time
;hands-free is negated by holding
;dropped is negated by holding
;there are two different definitions of adjacency, because sidekick can travel further than egobot
;issues do not exist, there are simply goals to achieve panel predicates
;inspection requires no tool and can be done by any robot
;patching requires a patch, must be done by an egobot, and consumes the patch
;welding requires a welder, must be done by an egobot, and does not consume the welder
(:predicates
(hands-free ?r - robot)
(camera-free ?r - robot)
(at ?r - robot ?l - location)
(holding ?r - robot ?t - tool)
(dropped ?t - tool ?l - location)
(egobot-adjacent ?l1 - location ?l2 - location)
(sidekick-adjacent ?l1 - location ?l2 - location)
(panel-at ?pn - panel ?l - location)
(is-inspected ?pn - panel)
(is-not-inspected ?pn - panel)
(welder-needed)
(patch-needed)
(welder-drop-needed ?l - location)
(welder-pick-up-valid ?l - location)
(patch-drop-needed ?l - location)
(patch-pick-up-valid ?l - location)
(is-patched ?pn - panel)
(is-welded ?pn - panel)
(deadline-open)
)
(:durative-action egobot-move
:parameters (?e - egobot ?l1 - location ?l2 - location)
:duration (= ?duration 1)
:condition (and
(at start (and
(at ?e ?l1)
))
(over all (and
(egobot-adjacent ?l1 ?l2)
))
)
:effect (and
(at start (and
(not (at ?e ?l1))
))
(at end (and
(at ?e ?l2)
))
)
)
(:durative-action sidekick-move
:parameters (?s - sidekick ?l1 - location ?l2 - location)
:duration (= ?duration 1)
:condition (and
(at start (and
(at ?s ?l1)
))
(over all (and
(sidekick-adjacent ?l1 ?l2)
))
)
:effect (and
(at start (and (not (at ?s ?l1))))
(at end (and (at ?s ?l2)))
)
)
(:durative-action inspect
:parameters (?r - robot ?pn - panel ?l - location)
:duration (= ?duration 1)
:condition (and
(at start (camera-free ?r))
(at start (deadline-open))
(over all (panel-at ?pn ?l))
(over all (at ?r ?l))
(at start (is-not-inspected ?pn))
)
:effect (and
(at start (not (is-not-inspected ?pn)))
(at start (not (camera-free ?r)))
(at end (is-inspected ?pn))
(at end (camera-free ?r))
(at end (increase (score) (ingoal ?pn)))
)
)
(:durative-action pick-up-welder
:parameters (?r - robot ?w - welder ?l - location)
:duration (= ?duration 1)
:condition (and
(at start (camera-free ?r))
(at start (hands-free ?r))
(at start (deadline-open))
(at start (dropped ?w ?l))
(over all (at ?r ?l))
(at start (welder-needed))
(at start (welder-pick-up-valid ?l))
)
:effect (and
(at start (not (dropped ?w ?l)))
(at start (not (camera-free ?r)))
(at start (not (hands-free ?r)))
(at end (holding ?r ?w))
(at end (camera-free ?r))
)
)
(:durative-action drop-welder
:parameters (?r - robot ?w - welder ?l - location)
:duration (= ?duration 1)
:condition (and
(at start (camera-free ?r))
(at start (deadline-open))
(at start (holding ?r ?w))
(at start (welder-drop-needed ?l))
(over all (at ?r ?l))
)
:effect (and
(at start (not (holding ?r ?w)))
(at start (not (camera-free ?r)))
(at start (not (hands-free ?r)))
(at start (not (welder-pick-up-valid ?l)))
(at start (not (welder-drop-needed ?l)))
(at end (dropped ?w ?l))
(at end (camera-free ?r))
(at end (hands-free ?r))
(at end (increase (score) (wegoal ?l)))
)
)
(:durative-action pick-up-patch
:parameters (?r - robot ?p - patch ?l - location)
:duration (= ?duration 1)
:condition (and
(at start (camera-free ?r))
(at start (hands-free ?r))
(at start (deadline-open))
(at start (dropped ?p ?l))
(over all (at ?r ?l))
(at start (patch-needed))
(at start (patch-pick-up-valid ?l))
)
:effect (and
(at start (not (dropped ?p ?l)))
(at start (not (camera-free ?r)))
(at start (not (hands-free ?r)))
(at end (holding ?r ?p))
(at end (camera-free ?r))
)
)
(:durative-action drop-patch
:parameters (?r - robot ?p - patch ?l - location)
:duration (= ?duration 1)
:condition (and
(at start (camera-free ?r))
(at start (deadline-open))
(at start (holding ?r ?p))
(at start (patch-drop-needed ?l))
(over all (at ?r ?l))
)
:effect (and
(at start (not (holding ?r ?p)))
(at start (not (camera-free ?r)))
(at start (not (hands-free ?r)))
(at start (not (patch-pick-up-valid ?l)))
(at end (not (patch-drop-needed ?l)))
(at end (dropped ?p ?l))
(at end (camera-free ?r))
(at end (hands-free ?r))
(at end (increase (score) (pagoal ?l)))
)
)
)