-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomain-1.pddl
80 lines (79 loc) · 2.43 KB
/
domain-1.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
(define (domain supermarket)
(:requirements :adl)
(:types
location
aisleCell shelves weighingScale checkoutStand - location
shopbot item -object
)
(:predicates
(connected ?from - aisleCell ?to - aisleCell)
(adjacent ?from - aisleCell ?to - location)
(holding ?shopbot - shopbot ?item - item)
(at-shopbot ?shopbot - shopbot ?cell - aisleCell)
(weighable ?item - item)
(weighed ?item - item)
(in ?item - item ?loc - location)
(checkout ?item - item)
)
(:constants
cell1 cell2 cell3 cell4 cell5 cell6 cell7 cell8 cell9 cell10
cell11 cell12 cell13 cell14 cell15 cell16 cell17 cell18 cell19 cell20 - aisleCell
shelf1 shelf2 shelf3 shelf4 shelf5 shelf6 shelf7 shelf8 - shelves
scale - weighingScale
cs - checkoutStand
)
(:action move
:parameters (?shopbot - shopbot ?from - aisleCell ?to - aisleCell)
:precondition (and
(at-shopbot ?shopbot ?from)
(connected ?from ?to))
:effect (and
(at-shopbot ?shopbot ?to)
(not (at-shopbot ?shopbot ?from)))
)
(:action pickUp
:parameters (?shopbot - shopbot ?item - item ?from - aisleCell ?loc - location)
:precondition (and
(adjacent ?from ?loc)
(in ?item ?loc) (at-shopbot ?shopbot ?from)
(not (holding ?shopbot ?item))
(forall (?otheritems - item)
(not (holding ?shopbot ?otheritems))))
:effect (and (holding ?shopbot ?item) (not (in ?item ?loc)))
)
(:action drop
:parameters (?shopbot - shopbot ?item - item ?from - aisleCell ?loc - location)
:precondition (and
(adjacent ?from ?loc)
(holding ?shopbot ?item)
(at-shopbot ?shopbot ?from)
(not (in ?item ?loc)))
:effect (and (in ?item ?loc)
(not (holding ?shopbot ?item)) )
)
(:action weigh
:parameters (?shopbot - shopbot ?item - item ?cell - aisleCell ?ws - weighingScale)
:precondition (and
(holding ?shopbot ?item)
(at-shopbot ?shopbot ?cell)
(adjacent ?cell ?ws)
(weighable ?item)
(not (weighed ?item)))
:effect (and (weighed ?item)
(not (holding ?shopbot ?item))
(in ?item ?ws))
)
(:action checkingout
:parameters (?shopbot - shopbot ?item - item ?cell - aisleCell ?cs - checkoutStand)
:precondition (and (holding ?shopbot ?item)
(at-shopbot ?shopbot ?cell)
(adjacent ?cell ?cs)
(or (not (weighable ?item))
(weighed ?item))
)
:effect (and (checkout ?item)
(not (holding ?shopbot ?item))
(in ?item ?cs)
)
)
)