Andrei Boutyline wrote:

A third approach is to allow multiple
instances of the same feature, but have a high-salience rule that sits
around and waits for the existence of two instances of the same feature,
and then retracts them and restates one feature with a combined weight;
my gut feeling is that this is the preferable approach, but necessitates
a bit more retraction than the first solution and allows repeat facts
which are against the rules of Jess.

I'd prefer the "third approach", because it neatly separates the tasks of asserting another weight for some feature and the one of accumulating the numbers. Repeat facts can be avoided by adding a slot with a unique value:
  (assert (weightedfeature (feature ?f) (weight ?w) (mark (gensym*))))

Wolfgang


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