forked from jakob-schuster/pddl_grid_problems
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomain.pddl
52 lines (50 loc) · 1.48 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
(define (domain template)
(:requirements :strips :typing :equality)
(:types
pos tile - object
player wall goop block - tile
)
(:predicates
(grid ?p - pos)
(up ?p1 - pos ?p2 - pos)
(down ?p1 - pos ?p2 - pos)
(left ?p1 - pos ?p2 - pos)
(right ?p1 - pos ?p2 - pos)
(at ?t - tile ?p - pos)
)
(:action move
:parameters (?p - player ?from - pos ?to - pos)
:precondition (and
(at ?p ?from)
(or
(up ?from ?to)
(down ?from ?to)
(left ?from ?to)
(right ?from ?to)
)
(not (exists (?t - tile) (at ?t ?to)))
)
:effect (and (at ?p ?to) (not (at ?p ?from)))
)
(:action push
:parameters (
?ply - player ?ply-from - pos
?ply-to - pos
?blk - block ?blk-to - pos
)
:precondition (and
(at ?ply ?ply-from)
(at ?blk ?ply-to)
(or
(and (up ?ply-from ?ply-to) (up ?ply-to ?blk-to))
(and (down ?ply-from ?ply-to) (down ?ply-to ?blk-to))
(and (left ?ply-from ?ply-to) (left ?ply-to ?blk-to))
(and (right ?ply-from ?ply-to) (right ?ply-to ?blk-to))
)
)
:effect (and
(at ?ply ?ply-to) (not (at ?ply ?ply-from))
(at ?blk ?blk-to) (not (at ?blk ?ply-to))
)
)
)