At 10:15 AM 7/17/2002 -0700, you wrote:
>My problem is I don't see how to write the RHS of a (need-object) rule
>to get the behavior I want when I have two different ways of concluding
>A, as in
>
>(B -> A) or (C -> A)

You could do it like this but it's very deterministic.
My question is: why will both get-A and get-A2 fire when the "needed"-lines 
are removed? Is this because they both are applicable at the same time 
during the inference process?


(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 ?)
=>
(assert (A True)))

(defrule get-A2
(need-A ?a)
(C ?)
=>
(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))))

--------------------------------------------------------------------
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