-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomain-deliveroo.pddl
114 lines (107 loc) · 2.54 KB
/
domain-deliveroo.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
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
;; domain file: domain-deliveroo.pddl
(define (domain default)
(:requirements :strips :typing)
(:types
tile
agent
parcel
)
(:predicates
(delivery ?t - tile)
(me ?a - agent)
(at ?x - (either agent parcel) ?t - tile)
(right ?t1 ?t2 - tile)
(left ?t1 ?t2 - tile)
(up ?t1 ?t2 - tile)
(down ?t1 ?t2 - tile)
(holding ?a - agent ?p - parcel)
)
;; Action to move right
(:action right
:parameters (?me - agent ?from ?to - tile)
:precondition (and
(me ?me)
(at ?me ?from)
(right ?from ?to)
)
:effect (and
(at ?me ?to)
(not (at ?me ?from))
)
)
;; Action to move left
(:action left
:parameters (?me - agent ?from ?to - tile)
:precondition (and
(me ?me)
(at ?me ?from)
(left ?from ?to)
)
:effect (and
(at ?me ?to)
(not (at ?me ?from))
)
)
;; Action to move up
(:action up
:parameters (?me - agent ?from ?to - tile)
:precondition (and
(me ?me)
(at ?me ?from)
(up ?from ?to)
)
:effect (and
(at ?me ?to)
(not (at ?me ?from))
)
)
;; Action to move down
(:action down
:parameters (?me - agent ?from ?to - tile)
:precondition (and
(me ?me)
(at ?me ?from)
(down ?from ?to)
)
:effect (and
(at ?me ?to)
(not (at ?me ?from))
)
)
;; Action to deliver
(:action deliver
:parameters (?me - agent ?p - parcel ?t - tile)
:precondition (and
(at ?me ?t)
(at ?p ?t)
)
:effect (and
(delivery ?t)
(not (at ?p ?t)) ; Assuming the parcel is considered delivered and removed from the tile
)
)
;; Action to pick-up
(:action pick-up
:parameters (?me - agent ?p - parcel ?t - tile)
:precondition (and
(at ?me ?t)
(at ?p ?t)
)
:effect (and
(holding ?me ?p)
(not (at ?p ?t))
)
)
;; Action to drop-off
(:action drop-off
:parameters (?me - agent ?p - parcel ?t - tile)
:precondition (and
(holding ?me ?p)
(at ?me ?t)
)
:effect (and
(at ?p ?t)
(not (holding ?me ?p))
)
)
)