Robert Kirby wrote:
Since the accumulate-NextTo pattern
(accumulate (bind ?xcount 0) (++ ?xcount) ?xcount (NextTo (room1 ?rid)))
doesn't include a room2 match, shouldn't the pattern be matched just once for
any one ?rid instantiation? The documentation is not clear about what a token
means:
In the program below, Jess will only fire the second rule if both are
uncommented, but each of them fires if the other one isn't there. If the
order of rule definitions is reversed, the second one wins again.
Jess Version 7.0p1
Kind regards
Wolfgang
(clear)
(deftemplate Obj
(slot id
This appears to be an incremental reset bug. The term incremental
reset refers to the special processing that has to be done to bring
a rule up to date if it's added to an already-populated working
memory. Jess expects you to do things the other way around: compile
the Rete network by
Perhaps this is of interest: The original code had two rules - the only
ones with accumulate - as the fifth and sixth rule between (reset) and
(run), and the problem didn't surface until I added number 6.
-W
Ernest Friedman-Hill wrote:
This appears to be an incremental reset bug. The term
Since the accumulate-NextTo pattern
(accumulate (bind ?xcount 0) (++ ?xcount) ?xcount (NextTo (room1 ?rid)))
doesn't include a room2 match, shouldn't the pattern be matched just once for
any one ?rid instantiation? The documentation is not clear about what a token
means: a match to a fact or