Can backward chaining be used with unordered facts, i.e. facts that have
slots and where the "need" matches on the necessary slot values? This seems
to work, but there are instances where I expect rules to be active (and to
fire), but they are not.
For example,
(deftemplate something
(slot id))
(do-backward-chaining something)
(defrule create-something
(need-something (id ?i))
=>
(assert (something (id ?i)))
)
(defrule test
(person ?i)
(something (id ?i))
=>
(printout t "Created something: " ?i crlf)
)
(reset)
(assert (person test-person))
(run)
After the "assert", create-something is on the agenda. After the run, the
facts are:
f-0 (initial-fact)
f-1 (person test-person)
f-2 (need-something (id test-person))
f-3 (something (id test-person))
For a total of 4 facts.
However, the test rule is not on the agenda and has not fired. Is this the
correct behavior or am I missing something?
Also, do deftemplates that extend from reactive deftemplates automatically
become reactive?
Thanks again,
Ryan Eberhard
---------------------------------------------------------------------
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]
---------------------------------------------------------------------