(define (domain towers-of-hanoise-pre) (:requirements :strips :negative-preconditions :probabilistic-effects :conditional-effects :disjunctive-preconditions :typing :universal-preconditions :equality ) (:types disk stick) (:predicates (on-top-of ?d1 - disk ?d2 - disk) (on-stick ?d1 - disk ?s1 - stick) (bigger ?d1 - disk ?d2 - disk) (is-big ?d) (moved-big) (failed) ) (:action single-move-big-not-moved :parameters (?d - disk ?d2 - disk ?s1 - stick ?s2 - stick) :precondition (and (not (failed)) (not (= ?d ?d2)) (not (= ?s1 ?s2)) (forall (?x - disk) (not (on-top-of ?x ?d))) (on-stick ?d ?s1) (or (on-top-of ?d ?d2) (forall (?x - disk) (not (on-top-of ?d ?x)))) (not (moved-big)) (forall (?x - disk) (not (and (on-stick ?x ?s2) (bigger ?d ?x)))) ) :effect (and (probabilistic .99 (and (when (on-top-of ?d ?d2) (not (on-top-of ?d ?d2))) (forall (?x - disk) (when (and (on-stick ?x ?s2) (forall (?y - disk) (not (on-top-of ?y ?x)))) (on-top-of ?d ?x) ) ) (not (on-stick ?d ?s1)) (on-stick ?d ?s2) ) .01 (failed) ) (when (is-big ?d) (moved-big)) ) ) (:action single-move-big-moved :parameters (?d - disk ?d2 - disk ?s1 - stick ?s2 - stick) :precondition (and (not (failed)) (not (= ?d ?d2)) (not (= ?s1 ?s2)) (moved-big) (forall (?x - disk) (not (on-top-of ?x ?d))) (on-stick ?d ?s1) (or (on-top-of ?d ?d2) (forall (?x - disk) (not (on-top-of ?d ?x)))) (forall (?x - disk) (not (and (on-stick ?x ?s2) (bigger ?d ?x)))) ) :effect (probabilistic .95 (and (when (on-top-of ?d ?d2) (not (on-top-of ?d ?d2))) (forall (?x - disk) (when (and (on-stick ?x ?s2) (forall (?y - disk) (not (on-top-of ?y ?x)))) (on-top-of ?d ?x) ) ) (not (on-stick ?d ?s1)) (on-stick ?d ?s2) ) .05 (failed) ) ) (:action double-move-big-not-moved :parameters (?d1 - disk ?d2 - disk ?d3 - disk ?s1 - stick ?s2 - stick) :precondition (and (not (failed)) (not (= ?s1 ?s2)) (not (moved-big)) (on-stick ?d1 ?s1) (on-stick ?d2 ?s1) (on-top-of ?d1 ?d2) (forall (?x - disk) (not (on-top-of ?x ?d1))) (or (on-top-of ?d2 ?d3) (forall (?x - disk) (not (on-top-of ?d2 ?x)))) (forall (?x - disk) (not (and (on-stick ?x ?s2) (bigger ?d2 ?x)))) ) :effect (and (probabilistic .8 (and (when (on-top-of ?d2 ?d3) (not (on-top-of ?d2 ?d3))) (forall (?x - disk) (when (and (on-stick ?x ?s2) (forall (?y - disk) (not (on-top-of ?y ?x)))) (on-top-of ?d2 ?x) )) (not (on-stick ?d1 ?s1)) (not (on-stick ?d2 ?s1)) (on-stick ?d1 ?s2) (on-stick ?d2 ?s2) ) .2 (failed) ) (when (is-big ?d2) (moved-big)) ) ) (:action double-move-big-moved :parameters (?d1 - disk ?d2 - disk ?d3 - disk ?s1 - stick ?s2 - stick) :precondition (and (not (failed)) (not (= ?s1 ?s2)) (moved-big) (on-stick ?d1 ?s1) (on-stick ?d2 ?s1) (on-top-of ?d1 ?d2) (forall (?x - disk) (not (on-top-of ?x ?d1))) (or (on-top-of ?d2 ?d3) (forall (?x - disk) (not (on-top-of ?d2 ?x)))) (forall (?x - disk) (not (and (on-stick ?x ?s2) (bigger ?d2 ?x)))) ) :effect (probabilistic .9 (and (when (on-top-of ?d2 ?d3) (not (on-top-of ?d2 ?d3))) (forall (?x - disk) (when (and (on-stick ?x ?s2) (forall (?y - disk) (not (on-top-of ?y ?x)))) (on-top-of ?d2 ?x) )) (not (on-stick ?d1 ?s1)) (not (on-stick ?d2 ?s1)) (on-stick ?d1 ?s2) (on-stick ?d2 ?s2) ) .1 (failed) ) ) ) (define (problem toh-prob-pre) (:domain towers-of-hanoise-pre) (:objects d1 d2 d3 d4 d5 - disk s1 s2 s3 - stick) (:init (on-top-of d1 d2) (on-top-of d2 d3) (on-top-of d3 d4) (on-top-of d4 d5) (on-stick d1 s1) (on-stick d2 s1) (on-stick d3 s1) (on-stick d4 s1) (on-stick d5 s1) (bigger d2 d1) (bigger d3 d2) (bigger d3 d1) (bigger d4 d3) (bigger d4 d2) (bigger d4 d1) (bigger d5 d4) (bigger d5 d3) (bigger d5 d2) (bigger d5 d1) (is-big d5) ) (:goal (and (on-stick d5 s3) (on-top-of d1 d2) (on-top-of d2 d3) (on-top-of d3 d4) (on-top-of d4 d5) )) )