-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcookie.ujshop
61 lines (57 loc) · 924 Bytes
/
cookie.ujshop
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
(defdomain cookie (
(:rewards
(achieve (have bob good-cookie) 10)
(achieve (have bob bad-cookie) -10)
)
(:operator (!goto ?agent ?from ?to)
; Preconditions
(
(at ?agent ?from)
(not (at ?agent ?to))
)
; Del effects
(
(at ?agent ?from)
)
; Add effects
(
(at ?agent ?to)
)
; Probability
1
)
(:operator (!buy_cookie ?agent)
; Preconditions
(
(at ?agent cookie-store)
)
buy_good_cookie
; Del effects
()
; Add effects
(
(have ?agent good-cookie)
)
; Probability
0.8
buy_bad_cookie
; Del effects
()
; Add effects
(
(have ?agent bad-cookie)
)
; Probability
0.2
)
(:method (get_cookie ?agent ?from ?to)
goto_and_buy_cookie
; Preconditions
()
; Subtasks
(
(!goto ?agent ?from ?to)
(!buy_cookie ?agent)
)
)
))