Skip to content

Commit 47063c2

Browse files
authored
Add missing requirements and fix syntax error in generator for the fridge domain (#44)
1 parent 0328d35 commit 47063c2

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

fridge/domain.pddl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212

1313

1414
(define (domain fridge-domain)
15-
(:requirements :strips :typing :quantified-preconditions)
15+
(:requirements :strips :typing :quantified-preconditions :negative-preconditions :disjunctive-preconditions)
1616
(:types screw backplane compressor fridge)
1717
(:predicates (screwed ?s - screw)
1818
(attached ?c - compressor ?f - fridge)
19-
(fits ?s - screw ?c -compressor)
19+
(fits ?s - screw ?c - compressor)
2020
(fridge-on ?f - fridge))
2121

2222

@@ -26,7 +26,7 @@
2626
:effect (screwed ?x))
2727

2828
(:action unfasten
29-
:parameters (?x - screw ?c - compressor)
29+
:parameters (?x - screw)
3030
:precondition (and (exists (?f - fridge)
3131
(exists (?c - compressor)
3232
(and (attached ?c ?f)
@@ -36,7 +36,7 @@
3636
:effect (not (screwed ?x)))
3737

3838
(:action start-fridge
39-
:parameters (?f - fridge ?c - compressor)
39+
:parameters (?f - fridge)
4040
:precondition
4141
(and (exists (?c - compressor)
4242
(and (attached ?c ?f)
@@ -69,9 +69,3 @@
6969
(forall (?a - screw)
7070
(imply (fits ?a ?x) (not (screwed ?a)))))
7171
:effect (attached ?x ?f)))
72-
73-
74-
75-
76-
77-

fridge/fridge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ int main( int argc, char *argv[] )
129129
}
130130
for ( i = 0; i < gfridges; i++ ) {
131131
for ( j = 0; j < gscrews; j++ ) {
132-
printf("\n(fits s%d-%d, c%d-0)", i, j, i);
133-
printf("\n(fits s%d-%d, c%d-1)", i, j, i);
132+
printf("\n(fits s%d-%d c%d-0)", i, j, i);
133+
printf("\n(fits s%d-%d c%d-1)", i, j, i);
134134
printf("\n(screwed s%d-%d)", i, j);
135135
}
136136
}

0 commit comments

Comments
 (0)