forked from melahi/pddl-instances
-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.pddl
66 lines (62 loc) · 1.92 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
;; Peg Solitaire sequential domain
(define (domain pegsolitaire-sequential)
(:requirements :typing :action-costs)
(:types location - object)
(:predicates
(IN-LINE ?x ?y ?z - location)
(occupied ?l - location)
(free ?l - location)
(move-ended)
(last-visited ?l - location)
)
(:functions (total-cost) - number)
(:action jump-new-move
:parameters (?from - location ?over - location ?to - location)
:precondition (and
(move-ended)
(IN-LINE ?from ?over ?to)
(occupied ?from)
(occupied ?over)
(free ?to)
)
:effect (and
(not (move-ended))
(not (occupied ?from))
(not (occupied ?over))
(not (free ?to))
(free ?from)
(free ?over)
(occupied ?to)
(last-visited ?to)
(increase (total-cost) 1)
)
)
(:action jump-continue-move
:parameters (?from - location ?over - location ?to - location)
:precondition (and
(last-visited ?from)
(IN-LINE ?from ?over ?to)
(occupied ?from)
(occupied ?over)
(free ?to)
)
:effect (and
(not (occupied ?from))
(not (occupied ?over))
(not (free ?to))
(free ?from)
(free ?over)
(occupied ?to)
(not (last-visited ?from))
(last-visited ?to)
)
)
(:action end-move
:parameters (?loc - location)
:precondition (last-visited ?loc)
:effect (and
(move-ended)
(not (last-visited ?loc))
)
)
)