-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain-solution3.1.pddl
75 lines (54 loc) · 1.54 KB
/
domain-solution3.1.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
(define (domain travelling_agent_bus)
(:requirements :typing :adl :fluents :equality)
(:types
city ; represented by a node on the map
bus ;
car ;
agent ;
plane ;
)
(:constants
;; You should not need to add any additional constants
Agent - agent
)
(:predicates
(agentAt ?city - city) ; the agent is at city ?c
(carAt ?city - city) ; the car is at city ?c
(road ?c1 - city ?c2 - city) ; city ?c1 and city ?c2 are connected by a single road
(air ?c1 - city ?c2 - city) ; city ?c1 and city ?c2 are connected by a single air route (?c1 -> ?c2)
(visited ?city - city)) ; the agent has visited city ?c
(:action ride
:parameters (?from ?to - city)
:precondition (and
(agentAt ?from)
(road ?from ?to))
:effect (and
(not (agentAt ?from))
(agentAt ?to)))
(:action drive
:parameters (?from ?to - city)
:precondition (and
(agentAt ?from)
(carAt ?from)
(road ?from ?to))
:effect (and
(not (agentAt ?from))
(not (carAt ?from))
(agentAt ?to)
(carAt ?to)))
(:action fly
:parameters (?from ?to - city)
:precondition (and
(agentAt ?from)
(air ?from ?to))
:effect (and
(not (agentAt ?from))
(agentAt ?to)))
(:action visit
:parameters (?c - city)
:precondition (and
(agentAt ?c)
(not (visited ?c)))
:effect (and
(visited ?c)))
)