diff --git a/src/main/resources/com/naveensundarg/planner/problems/tora/sodacan.clj b/src/main/resources/com/naveensundarg/planner/problems/tora/sodacan.clj index 1874555..3269e81 100644 --- a/src/main/resources/com/naveensundarg/planner/problems/tora/sodacan.clj +++ b/src/main/resources/com/naveensundarg/planner/problems/tora/sodacan.clj @@ -1,13 +1,19 @@ {:name "soda can challenge" - :background [(forall [?thing] (if (and (Checked ?thing) (Possible ?thing)) + :background [ ;; If all the possible things are checked, then the answer is known. + (forall [?thing] (if (and (Checked ?thing) (Possible ?thing)) (exists ?answer (Know ?answer))))] - :start [(Possible A) + :start [;; A, B, and C are possible + (Possible A) (Possible B) (Possible C) + ;;; A, B, and C are the only possibilities (forall [?u] (if (and (not (= ?u A)) (not (= ?u B)) (not (= ?u C))) (not (Possible ?u))))] - :actions [(define-action checkU [?q] + + + :actions [ ;;; Checking something that is possible + (define-action attend [?q] {:preconditions [(Possible ?q)] :additions [(Checked ?q)] :deletions []})]