;; -*-lisp-*- ;; Coffee domain: ;; ;; Dearden Richard, and Craig Boutilier. 1997. Abstraction and ;; approximate decision-theoretic planning. Artificial ;; Intelligence, 89(1-2):219-283. ;; ;; coffee10 limits to 10 deliveries (define (domain coffee10) (:requirements :negative-preconditions :disjunctive-preconditions :conditional-effects :probabilistic-effects :rewards) (:predicates (in-office) (raining) (has-umbrella) (is-wet) (has-coffee) (user-has-coffee) (del1) (del2) (del3) (del4) (del5) (del6) (del7) (del8) (del9) (del10)) (:action move :effect (and (when (in-office) (probabilistic 0.9 (not (in-office)))) (when (not (in-office)) (probabilistic 0.9 (in-office))) (when (and (raining) (not (has-umbrella))) (probabilistic 0.9 (is-wet) 0.1 (when (not (is-wet)) (increase (reward) 0.2)))) (when (or (not (raining)) (has-umbrella)) (when (not (is-wet)) (increase (reward) 0.2))) (when (user-has-coffee) (increase (reward) 0.8)))) (:action buy-coffee :effect (and (when (not (in-office)) (probabilistic 0.8 (has-coffee))) (when (user-has-coffee) (increase (reward) 0.8)) (when (not (is-wet)) (increase (reward) 0.2)))) (:action get-umbrella :effect (and (when (in-office) (probabilistic 0.9 (has-umbrella))) (when (user-has-coffee) (increase (reward) 0.8)) (when (not (is-wet)) (increase (reward) 0.2)))) (:action deliver-coffee :effect (and (and (when (and (in-office) (has-coffee)) (probabilistic 0.8 (and (user-has-coffee) (not (has-coffee)) (increase (reward) 0.8)) 0.2 (and (probabilistic 0.5 (not (has-coffee))) (when (user-has-coffee) (increase (reward) 0.8))))) (when (and (not (in-office)) (has-coffee)) (and (probabilistic 0.8 (not (has-coffee))) (when (user-has-coffee) (increase (reward) 0.8)))) (when (and (not (has-coffee)) (user-has-coffee)) (increase (reward) 0.8)) (when (not (is-wet)) (increase (reward) 0.2))) (and (when (del9) (del10)) (when (del8) (del9)) (when (del7) (del8)) (when (del6) (del7)) (when (del5) (del6)) (when (del4) (del5)) (when (del3) (del4)) (when (del2) (del3)) (when (del1) (del2)) (del1))))) (define (problem coffee10) (:domain coffee10) (:init (probabilistic 0.5 (in-office)) (probabilistic 0.5 (raining)) (probabilistic 0.5 (has-umbrella)) (probabilistic 0.5 (is-wet)) (probabilistic 0.5 (has-coffee)) (probabilistic 0.5 (user-has-coffee))) (:goal (del10)))