-
Notifications
You must be signed in to change notification settings - Fork 0
/
taxi_domain_v2.pddl
121 lines (102 loc) · 3.71 KB
/
taxi_domain_v2.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
111
112
113
114
115
116
117
118
119
120
121
;;This is the second version of the domain with full ADL requirements
(define (domain taxi)
(:requirements :strips :typing :action-costs :adl)
(:types
taxi taxistand passenger
)
(:predicates
(is_taxi_at ?t - taxi ?ts - taxistand)
(is_passenger_at ?p - passenger ?ts - taxistand)
(is_along_sidewalk ?t - taxi)
(is_double_parked ?t - taxi)
(is_waiting ?p - passenger)
(is_boarded ?p - passenger ?t - taxi)
)
(:functions
(distance ?ts1 ?ts2 - taxistand)
(total-cost)
)
(:action move
:parameters (?t - taxi ?from - taxistand ?to - taxistand)
:precondition (and
(is_taxi_at ?t ?from)
(or (is_double_parked ?t)
(and (is_along_sidewalk ?t)
(not (exists (?other - taxi)
(and (is_double_parked ?other)
(is_taxi_at ?other ?from)
(not (= ?t ?other))
)))))
(not (exists (?other - taxi)
(and (is_double_parked ?other)
(is_taxi_at ?other ?to))))
)
:effect (and
(not (is_taxi_at ?t ?from))
(is_taxi_at ?t ?to)
(when (not (exists (?other - taxi)
(and (is_taxi_at ?other ?to)
(not (= ?t ?other))
)
)
)
(and (is_along_sidewalk ?t)
(not (is_double_parked ?t))
)
)
(when (exists (?other - taxi)
(and (is_taxi_at ?other ?to)
(is_along_sidewalk ?other)
(not (= ?t ?other))
)
)
(and (is_double_parked ?t)
(not (is_along_sidewalk ?t))
)
)
(increase (total-cost) (distance ?from ?to))
)
)
(:action load
:parameters (?t - taxi ?loc - taxistand)
:precondition (and
(is_taxi_at ?t ?loc)
(is_along_sidewalk ?t)
(not (is_double_parked ?t))
(exists (?person - passenger)
(and (is_passenger_at ?person ?loc)
(is_waiting ?person)
(not (is_boarded ?person ?t))
)
)
(not (exists (?other -taxi)
(is_boarded ?person ?other)
)
)
)
:effect
(forall (?person - passenger)
(when (and (is_waiting ?person)
(is_passenger_at ?person ?loc)
)
(and (not (is_waiting ?person))
(is_boarded ?person ?t)
)
)
)
)
(:action unload
:parameters (?t - taxi ?loc - taxistand ?person - passenger)
:precondition (and
(is_taxi_at ?t ?loc)
(is_along_sidewalk ?t)
(not (is_double_parked ?t))
(is_boarded ?person ?t)
)
:effect
(when (and (is_boarded ?person ?t))
(and (not (is_boarded ?person ?t))
(is_passenger_at ?person ?loc)
))
)
)