Adding in the soda can challenge.

This commit is contained in:
Naveen Sundar Govindarajulu 2018-06-15 14:55:57 -07:00
parent 5ca5fcfc5d
commit 2624b0c411

View file

@ -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 []})]