-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwolf-goat-cabbage-problem-vegan.pddl
51 lines (42 loc) · 1.22 KB
/
wolf-goat-cabbage-problem-vegan.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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; problem definition for wolf, goat, cabbage problem
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define
(problem boat1)
(:domain boat)
; only needs two objects, namely representing
; either banke side of the river, [w]est and [e]ast
(:objects w e)
(:INIT
; wolf, goat, cabbage, boat are all on
; the west side to start with
(config w w w w)
; represent all valid states
; these two are the special case,
; representing that wolf and goat are
; safe together even if the boat is away
(valid w w e e)
(valid e e w w)
; these are all cases where two entities
; are always safe as long as the boat is
; with them. In other words, a single entity
; on the other side is also always safe
; for west side
(valid w w w w)
(valid w w e w)
(valid w e w w)
(valid e w w w)
; for east side
(valid e e e e)
(valid e e w e)
(valid e w e e)
(valid w e e e)
; these are all valid states that are
; ever allowed
)
(:goal (AND
; they all have to move to the east side
(config e e e e)
)
)
)