It looks like this:

(defrule init-deliver-narrations
   (declare (salience -10))
   (just-entered ?u ?e ?t)
   (is-about ?best1 ?e)
   (is-about ?best2 ?e)
   (test (neq ?best2 ?best1))
   (is-about ?best3 ?e)
   (test (neq ?best3 ?best1 ?best2))
   (not (initialized ?u ?e ?t))
=>
   (assert (initialized ?u ?e ?t))
   (assert  (deliver-info-narration ?u ?t ?best1 1))   
   (assert  (deliver-info-narration ?u ?t ?best2 2))
   (assert  (deliver-info-narration ?u ?t ?best3 3))
)

The above give me distinct ?best1, ?best2 and ?best3.
But If I change the rule to:

(defrule init-deliver-narrations
   (declare (salience -10))
   (just-entered ?u ?e ?t)
   (is-about ?best1 ?e)
   (is-about ?best2&:(neq ?best2 ?best1) ?e)
   (is-about ?best3&:(neq ?best3 ?best1 ?best2) ?e)
   (not (initialized ?u ?e ?t))
=>
   (assert (initialized ?u ?e ?t))
   (assert  (deliver-info-narration ?u ?t ?best1 1))   
   (assert  (deliver-info-narration ?u ?t ?best2 2))
   (assert  (deliver-info-narration ?u ?t ?best3 3))
)

?best1, best2, and best3 will be the same.  Same problem happens in another
rules.

Leila




On Thu, 22 Jan 2004 19:34:25 -0800 (PST) [EMAIL PROTECTED] wrote:
> I think [EMAIL PROTECTED] wrote:
> > Hello.
> >
> > Do constraining matches with predicate functions only work with
unordered
> > facts?
> 
> No, they work with all facts. The code you showed us wasn't your real
> code -- if you show us a real rule you're having problems with, we
> might be able to tell you where you've gone wrong.
> 
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Science and Engineering PSEs      Phone: (925) 294-2154
> Sandia National Labs              FAX:   (925) 294-2234
> PO Box 969, MS 9012               [EMAIL PROTECTED]
> Livermore, CA 94550       http://herzberg.ca.sandia.gov
> 
> --------------------------------------------------------------------
> 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]

> --------------------------------------------------------------------

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