Hmmm, not really awake yet I guess. THIS one is correct:
(sorry for the mail-bombing)

(do-backward-chaining A)
(do-backward-chaining B)
(do-backward-chaining C)

(defrule succeed-A
(A ?)
=>
(printout t A))

(defrule get-A
(need-A ?)
(C ?c)                          ;;<- needed
(test (neq ?c True))            ;;<- needed
(B ?b)
(test (eq ?b True))
=>
(assert (A True)))

(defrule get-A2
(need-A ?)
(C ?c)
(test (eq ?c True))
=>
(assert (A True)))

(defrule get-C
(need-C ?)
=>
(printout t "c?")
(assert (C (read))))

(defrule get-B
(need-B ?)
=>
(printout t "b?")
(assert (B (read))))

(reset)
(run)

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to