-
Notifications
You must be signed in to change notification settings - Fork 0
/
sokoban-domain.pddl
111 lines (102 loc) · 2.67 KB
/
sokoban-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
109
110
(define (domain sokoban)
(:requirements :strips :negative-preconditions)
(:predicates (adjwe ?h1 ?h2) (adjsn ?v1 ?v2)
(sokoban_at ?h ?v) (wall_at ?h ?v) (crate_at ?h ?v)
)
(:action move-n
:parameters (?x1 ?y0 ?y1)
:precondition (and
(adjsn ?y0 ?y1)
(sokoban_at ?x1 ?y0)
(not (crate_at ?x1 ?y1)) (not (wall_at ?x1 ?y1))
)
:effect (and
(not (sokoban_at ?x1 ?y0))
(sokoban_at ?x1 ?y1)
)
)
(:action push-n
:parameters (?x1 ?y0 ?y1 ?y2)
:precondition (and
(adjsn ?y0 ?y1) (adjsn ?y1 ?y2)
(sokoban_at ?x1 ?y0) (crate_at ?x1 ?y1)
(not (crate_at ?x1 ?y2)) (not (wall_at ?x1 ?y2))
)
:effect (and
(not (sokoban_at ?x1 ?y0)) (not (crate_at ?x1 ?y1))
(sokoban_at ?x1 ?y1) (crate_at ?x1 ?y2)
)
)
(:action move-s
:parameters (?x1 ?y0 ?y1)
:precondition (and
(adjsn ?y1 ?y0)
(sokoban_at ?x1 ?y0)
(not (crate_at ?x1 ?y1)) (not (wall_at ?x1 ?y1))
)
:effect (and
(not (sokoban_at ?x1 ?y0))
(sokoban_at ?x1 ?y1)
)
)
(:action push-s
:parameters (?x1 ?y0 ?y1 ?y2)
:precondition (and
(adjsn ?y1 ?y0) (adjsn ?y2 ?y1)
(sokoban_at ?x1 ?y0) (crate_at ?x1 ?y1)
(not (crate_at ?x1 ?y2)) (not (wall_at ?x1 ?y2))
)
:effect (and
(not (sokoban_at ?x1 ?y0)) (not (crate_at ?x1 ?y1))
(sokoban_at ?x1 ?y1) (crate_at ?x1 ?y2)
)
)
(:action move-e
:parameters (?x1 ?x2 ?y1)
:precondition (and
(adjwe ?x1 ?x2)
(sokoban_at ?x1 ?y1)
(not (crate_at ?x2 ?y1)) (not (wall_at ?x2 ?y1))
)
:effect (and
(not (sokoban_at ?x1 ?y1))
(sokoban_at ?x2 ?y1)
)
)
(:action push-e
:parameters (?x1 ?x2 ?x3 ?y1)
:precondition (and
(adjwe ?x1 ?x2) (adjwe ?x2 ?x3)
(sokoban_at ?x1 ?y1) (crate_at ?x2 ?y1)
(not (crate_at ?x3 ?y1)) (not (wall_at ?x3 ?y1))
)
:effect (and
(not (sokoban_at ?x1 ?y1)) (not (crate_at ?x2 ?y1))
(sokoban_at ?x2 ?y1) (crate_at ?x3 ?y1)
)
)
(:action move-w
:parameters (?x1 ?x2 ?y1)
:precondition (and
(adjwe ?x2 ?x1)
(sokoban_at ?x1 ?y1)
(not (crate_at ?x2 ?y1)) (not (wall_at ?x2 ?y1))
)
:effect (and
(not (sokoban_at ?x1 ?y1))
(sokoban_at ?x2 ?y1)
)
)
(:action push-w
:parameters (?x1 ?x2 ?x3 ?y1)
:precondition (and
(adjwe ?x2 ?x1) (adjwe ?x3 ?x2)
(sokoban_at ?x1 ?y1) (crate_at ?x2 ?y1)
(not (crate_at ?x3 ?y1)) (not (wall_at ?x3 ?y1))
)
:effect (and
(not (sokoban_at ?x1 ?y1)) (not (crate_at ?x2 ?y1))
(sokoban_at ?x2 ?y1) (crate_at ?x3 ?y1)
)
)
)