From aec7d98c13dc248947837a2a970269b528e99931 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Fri, 29 Mar 2024 17:37:41 -0400 Subject: [PATCH] Removed unused domain, commented out debug code --- .../rairlab/planner/search/AStarPlanner.java | 6 +- .../problems/conformant/block_tiny.clj | 108 ------------------ .../problems/conformant/progression.clj | 81 ------------- 3 files changed, 3 insertions(+), 192 deletions(-) delete mode 100644 src/main/resources/org/rairlab/planner/problems/conformant/block_tiny.clj delete mode 100644 src/main/resources/org/rairlab/planner/problems/conformant/progression.clj diff --git a/src/main/java/org/rairlab/planner/search/AStarPlanner.java b/src/main/java/org/rairlab/planner/search/AStarPlanner.java index 6212d9d..bbed1ba 100644 --- a/src/main/java/org/rairlab/planner/search/AStarPlanner.java +++ b/src/main/java/org/rairlab/planner/search/AStarPlanner.java @@ -69,8 +69,8 @@ public class AStarPlanner { search.add(searchStart); // For debugging... - Map> seq = new HashMap>(); - seq.put(start, new ArrayList()); + // Map> seq = new HashMap>(); + // seq.put(start, new ArrayList()); // Current set of plans Set plansFound = new HashSet(); @@ -150,7 +150,7 @@ public class AStarPlanner { search.add(futureSearch); // For debugging... - seq.put(nextState, next_actions); + // seq.put(nextState, next_actions); } } diff --git a/src/main/resources/org/rairlab/planner/problems/conformant/block_tiny.clj b/src/main/resources/org/rairlab/planner/problems/conformant/block_tiny.clj deleted file mode 100644 index a11b566..0000000 --- a/src/main/resources/org/rairlab/planner/problems/conformant/block_tiny.clj +++ /dev/null @@ -1,108 +0,0 @@ -; Original problem from Joerg Hoffmann and Ronen Brafman -{:name "Block-Conformant-Tiny" - :background [ - ; Setting object types - (block b1) - (block b2) - - ; Unique name axioms - (not (= b1 b2)) - - ; Block World Axioms - - ; Blocks are never on themselves - (forall [x] (not (on x x))) - ; on is not symmetric - (forall [x y] (if (on x y) (not (on y x)))) - ; Any block on a table isn't on top of another block - (forall [x y] (if (on-table x) (not (on x y)))) - ; Any block that is cleared does not have another block on top of it - (forall [x y] (if (clear x) (not (on y x)))) - - ; NOTE: Slow if we use complicated definitions - ;; ; A block is on the table if it isn't on top of any other block - ;; (forall [x] (iff (on-table x) (forall [y] (not (on x y))))) - ;; ; A block is cleared if there is no other block on top of it - ;; (forall [x] (iff (clear x) (forall [y] (not (on y x))))) - ] - - - :actions [ - - (define-action move-bstack-to-t [?b ?b1] { - :preconditions [ - ; Type restriction - (block ?b) - (block ?b1) - ; Arguments unique - (not (= ?b ?b1)) - - ; Preconditions - ;; (not (on-table ?b)) - - ] - ; TODO: Think hard about the effect - ;; :effect (and (when (on ?b ?bl) - ;; (and (not (on ?b ?bl)) (on-table ?b) (clear ?bl))))) - :additions [ - ; The following creates a contradiction because - ; (on-table ?b) -> (not (on ?b ?b1)) and - ; we can't have P -> \neg P - ;; (if (on ?b ?b1) (and (on-table ?b) (clear ?b1))) - - ] - :deletions [ ] - }) - - (define-action move-t-to-b [?bm ?bt ?t] { - :preconditions [ - ; Type restrictions - (block ?bm) - (block ?bt) - ; Arguments unique - (not (= ?bm ?bt)) - ; Primary preconditions - (clear ?bm ?t) - (clear ?bt ?t) - (on-table ?bm ?t) - ] - :additions [ - (on ?bm ?bt (s ?t)) - - (not (clear ?bt (s ?t))) - (not (on-table ?bm (s ?t))) - ] - :deletions [ - ;; (not (on ?bm ?bt)) - - ;; (clear ?bt) - ;; (on-table ?bm) - ] - }) - ] - :start [ - ; Unknown facts don't need to be stated - ; since we don't assume closed world assumption. - - ; Negated predicates in this example is handled by - ; the block world axioms - - (or - (and - (on b2 b1 t0) - (clear b2 t0) - (on-table b1 t0) - ) - - (and - (on b1 b2 t0) - (clear b1 t0) - (on-table b2 t0) - ) - ) - ] - :goal [ - (exists [x] (on b2 b1 x)) - ] - -} diff --git a/src/main/resources/org/rairlab/planner/problems/conformant/progression.clj b/src/main/resources/org/rairlab/planner/problems/conformant/progression.clj deleted file mode 100644 index b565e91..0000000 --- a/src/main/resources/org/rairlab/planner/problems/conformant/progression.clj +++ /dev/null @@ -1,81 +0,0 @@ -; Original problem from Joerg Hoffmann and Ronen Brafman -{:name "Block-Conformant-Tiny" - :background [ - ; Setting object types - (Believes! a t0 (block b1)) - (Believes! a t0 (block b2)) - - ; Unique name axioms - (Believes! a t0 (not (= b1 b2))) - - ; Block World Axioms - - ; Blocks are never on themselves - (Believes! a t0 (forall [x] (not (on x x)))) - ; on is not symmetric - (Believes! a t0 (forall [x y] (if (on x y) (not (on y x))))) - ; Any block on a table isn't on top of another block - (Believes! a t0 (forall [x y] (if (on-table x) (not (on x y))))) - ; Any block that is cleared does not have another block on top of it - (Believes! a t0 (forall [x y] (if (clear x) (not (on y x))))) - ] - - - :actions [ - - (define-action move-t-to-b [?bm ?bt] { - :preconditions [ - (Believes! a ?now (and - ; Type Restrictions - (block ?bm) - (block ?bt) - ; Arguments Unique - (not (= ?bm ?bt)) - ; Primary preconditions - (clear ?bm) - (clear ?bt) - (on-table ?bm) - )) - ; NOTE: QA Algorithm is very barebones, - ; currently does not support beliefs under - ; binary operations. Example: - ;; (and - ;; (Believes! a t0 (block ?bm)) - ;; (Believes! a t0 (block ?bt)) - ;; ) - ] - :additions [ - ; ShadowProver uses string comparisons to determine - ; ordering on time points. - ; Spectra currently hacks around this by replacing - ; ?next where the constant - ; that represents ?now + 1. - ; ShadowProver Limitation: Cannot go beyond 10 time points - (Believes! a ?next (on ?bm ?bt)) - - ; These below shouldn't be needed but left for posterity - ;; (Believes! a ?next (not (clear ?bt))) - ;; (Believes! a ?next (not (on-table ?bm))) - ] - :deletions [ ] - }) - ] - :start [ - ; Unknown facts don't need to be stated - ; since we don't assume closed world assumption. - - ; Negated predicates in this example is handled by - ; the block world axioms - - (Believes! a t0 (on-table b2)) - (Believes! a t0 (on-table b1)) - (Believes! a t0 (clear b1)) - (Believes! a t0 (clear b2)) - ] - :goal [ - ;; (Believes! a t0 (clear ?bm)) - ; Try a there exists at some point - (exists [t] (Believes! a t (on b1 b2))) - ] - -}