From 6008eb901de3322452c4dac5feb5a49fe618485e Mon Sep 17 00:00:00 2001 From: Francesco Fuggitti Date: Tue, 8 Nov 2022 17:40:24 +0100 Subject: [PATCH] add different version of BW nondeterministic --- .../pddl_files/blocksworld_fond/domain.pddl | 29 +++++++++++++++++++ .../pddl_files/blocksworld_fond/p01.pddl | 11 +++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/fixtures/pddl_files/blocksworld_fond/domain.pddl create mode 100644 tests/fixtures/pddl_files/blocksworld_fond/p01.pddl diff --git a/tests/fixtures/pddl_files/blocksworld_fond/domain.pddl b/tests/fixtures/pddl_files/blocksworld_fond/domain.pddl new file mode 100644 index 0000000..98ff5e9 --- /dev/null +++ b/tests/fixtures/pddl_files/blocksworld_fond/domain.pddl @@ -0,0 +1,29 @@ +(define (domain blocks-world-domain) + (:requirements :strips :equality :conditional-effects :non-deterministic) + + (:constants Table) + + (:predicates (on ?x ?y) + (clear ?x) + (block ?b) + ) + + ;; Define step for placing one block on another. + (:action puton + :parameters (?x ?y ?z) + :precondition (and (on ?x ?z) (clear ?x) (clear ?y) + (not (= ?y ?z)) (not (= ?x ?z)) + (not (= ?x ?y)) (not (= ?x Table))) + :effect + (oneof + (and (on ?x ?y) (not (on ?x ?z)) + (when (not (= ?z Table)) (clear ?z)) + (when (not (= ?y Table)) (not (clear ?y))) + ) + (and (on ?x Table) + (when (not (= ?z Table)) (and (not (on ?x ?z)) (clear ?z))) + (when (not (= ?y Table)) (not (clear ?y))) + ) + ) + ) + ) diff --git a/tests/fixtures/pddl_files/blocksworld_fond/p01.pddl b/tests/fixtures/pddl_files/blocksworld_fond/p01.pddl new file mode 100644 index 0000000..38dfc25 --- /dev/null +++ b/tests/fixtures/pddl_files/blocksworld_fond/p01.pddl @@ -0,0 +1,11 @@ +(define (problem sussman-anomaly) ; graphplan 3 steps + (:domain blocks-world-domain) + (:objects A B C) + (:init (block A) (block B) (block C) (block Table) + (on C A) (on A Table) (on B Table) + (clear C) (clear B) (clear Table)) + ;(:goal (eventually (on B A)) + ;) + (:goal (and )) + +)