forked from AI-Planning/pddl-generators
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdomain.pddl
More file actions
71 lines (60 loc) · 2.51 KB
/
Copy pathdomain.pddl
File metadata and controls
71 lines (60 loc) · 2.51 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
; (c) 1993,1994 Copyright (c) University of Washington
; Written by Tony Barrett.
; All rights reserved. Use of this software is permitted for non-commercial
; research purposes, and it may be copied only for that use. All copies must
; include this copyright message. This software is made available AS IS, and
; neither the authors nor the University of Washington make any warranty about
; the software or its performance.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Joerg's fridgly domain
(define (domain fridge-domain)
(:requirements :strips :typing :quantified-preconditions :negative-preconditions :disjunctive-preconditions)
(:types screw backplane compressor fridge)
(:predicates (screwed ?s - screw)
(attached ?c - compressor ?f - fridge)
(fits ?s - screw ?c - compressor)
(fridge-on ?f - fridge))
(:action fasten
:parameters (?x - screw)
:precondition (not (screwed ?x))
:effect (screwed ?x))
(:action unfasten
:parameters (?x - screw)
:precondition (and (exists (?f - fridge)
(exists (?c - compressor)
(and (attached ?c ?f)
(fits ?x ?c)
(not (fridge-on ?f)))))
(screwed ?x))
:effect (not (screwed ?x)))
(:action start-fridge
:parameters (?f - fridge)
:precondition
(and (exists (?c - compressor)
(and (attached ?c ?f)
(forall (?a - screw)
(imply (fits ?a ?c) (screwed ?a)))))
(not (fridge-on ?f)))
:effect (fridge-on ?f))
(:action stop-fridge
:parameters (?f - fridge)
:precondition (fridge-on ?f)
:effect
(not (fridge-on ?f)))
(:action remove-compressor
:parameters (?x - compressor ?f - fridge)
:precondition
(and (not (fridge-on ?f))
(attached ?x ?f)
(forall (?a - screw)
(imply (fits ?a ?x) (not (screwed ?a)))))
:effect (not (attached ?x ?f)))
(:action attach-compressor
:parameters (?x - compressor ?f - fridge)
:precondition
(and (not (fridge-on ?f))
(forall (?y - compressor)
(not (attached ?y ?f)))
(forall (?a - screw)
(imply (fits ?a ?x) (not (screwed ?a)))))
:effect (attached ?x ?f)))