-
Notifications
You must be signed in to change notification settings - Fork 4
/
bus-fare.pddl
executable file
·32 lines (31 loc) · 1.03 KB
/
bus-fare.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
(define (domain bus-fare)
(:requirements :typing :strips :equality :probabilistic-effects)
(:types coin)
(:predicates (have-1-coin) (have-2-coin) (have-3-coin) (have-fare))
(:action bet-coin-1 :parameters ()
:precondition (have-1-coin)
:effect (and (not (have-1-coin))
(probabilistic 0.01 (have-3-coin))))
(:action bet-coin-2 :parameters ()
:precondition (have-2-coin)
:effect (and (not (have-2-coin))
(probabilistic
0.01 (have-3-coin)
0.99 (have-1-coin))))
(:action wash-car-1 :parameters ()
:precondition (have-1-coin)
:effect (probabilistic
0.5 (and (not (have-1-coin))
(have-2-coin))))
(:action wash-car-2 :parameters ()
:precondition (have-2-coin)
:effect (probabilistic
0.5 (and (not (have-2-coin))
(have-1-coin))))
(:action buy-fare :parameters ()
:precondition (have-3-coin)
:effect (and (not (have-3-coin)) (have-fare))))
(define (problem bus-fare-problem)
(:domain bus-fare)
(:init (have-1-coin))
(:goal (have-fare)))