forked from potassco/pddl-instances
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdomain.pddl
108 lines (94 loc) · 3.33 KB
/
domain.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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; The child-snack domain 2013
;;
;; This domain is for planning how to make and serve sandwiches for a group of
;; children in which some are allergic to gluten. There are two actions for
;; making sandwiches from their ingredients. The first one makes a sandwich and
;; the second one makes a sandwich taking into account that all ingredients are
;; gluten-free. There are also actions to put a sandwich on a tray, to move a tray
;; from one place to another and to serve sandwiches.
;;
;; Problems in this domain define the ingredients to make sandwiches at the initial
;; state. Goals consist of having all kids served with a sandwich to which they
;; are not allergic.
;;
;; Author: Raquel Fuentetaja and Tomás de la Rosa
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (domain child-snack)
(:requirements :typing :equality)
(:types child bread-portion content-portion sandwich tray place)
(:constants kitchen - place)
(:predicates (at_kitchen_bread ?b - bread-portion)
(at_kitchen_content ?c - content-portion)
(at_kitchen_sandwich ?s - sandwich)
(no_gluten_bread ?b - bread-portion)
(no_gluten_content ?c - content-portion)
(ontray ?s - sandwich ?t - tray)
(no_gluten_sandwich ?s - sandwich)
(allergic_gluten ?c - child)
(not_allergic_gluten ?c - child)
(served ?c - child)
(waiting ?c - child ?p - place)
(at ?t - tray ?p - place)
(notexist ?s - sandwich)
)
(:action make_sandwich_no_gluten
:parameters (?s - sandwich ?b - bread-portion ?c - content-portion)
:precondition (and (at_kitchen_bread ?b)
(at_kitchen_content ?c)
(no_gluten_bread ?b)
(no_gluten_content ?c)
(notexist ?s))
:effect (and
(not (at_kitchen_bread ?b))
(not (at_kitchen_content ?c))
(at_kitchen_sandwich ?s)
(no_gluten_sandwich ?s)
(not (notexist ?s))
))
(:action make_sandwich
:parameters (?s - sandwich ?b - bread-portion ?c - content-portion)
:precondition (and (at_kitchen_bread ?b)
(at_kitchen_content ?c)
(notexist ?s)
)
:effect (and
(not (at_kitchen_bread ?b))
(not (at_kitchen_content ?c))
(at_kitchen_sandwich ?s)
(not (notexist ?s))
))
(:action put_on_tray
:parameters (?s - sandwich ?t - tray)
:precondition (and (at_kitchen_sandwich ?s)
(at ?t kitchen))
:effect (and
(not (at_kitchen_sandwich ?s))
(ontray ?s ?t)))
(:action serve_sandwich_no_gluten
:parameters (?s - sandwich ?c - child ?t - tray ?p - place)
:precondition (and
(allergic_gluten ?c)
(ontray ?s ?t)
(waiting ?c ?p)
(no_gluten_sandwich ?s)
(at ?t ?p)
)
:effect (and (not (ontray ?s ?t))
(served ?c)))
(:action serve_sandwich
:parameters (?s - sandwich ?c - child ?t - tray ?p - place)
:precondition (and (not_allergic_gluten ?c)
(waiting ?c ?p)
(ontray ?s ?t)
(at ?t ?p))
:effect (and (not (ontray ?s ?t))
(served ?c)))
(:action move_tray
:parameters (?t - tray ?p1 ?p2 - place)
:precondition (and (at ?t ?p1))
:effect (and (not (at ?t ?p1))
(at ?t ?p2)))
)