Hi Matthew,
Erk. Thanks for bringing this to my attention.
gensym* doesn't work the way it does in CLIPS anymore - I'll spare
longtime listeners the explanation why, but trust me, it's for a good
cause. I should definitely update the documentation for that
function. I'll also figure out a fix for ANIMALS - I think the easy
fix is just to maintain a fact like (next-node-index 327) and
increment it - in effect, write a local gensym* that will work across
save/restores.
I think Matthew Denson wrote:
>
> Good afternoon,
>
> I downloaded JESS yesterday (haven't looked at CLIPS) and started
> monitoring this list today, so this probably is a repeat. I apologize in
> advance.
>
> I've been looking at animals.clp that came with Jess4.1 and was getting
> some quirky results when I started adding animals. I loaded the facts
> into a clean session and looked at them and there seemed to be a problem
> getting unique node names which kind of throws the whole thing in a
> tailspin. Looking at the rules I think I've found the lines that are
> being depended on to get unique names.
>
> (bind ?newnode1 (gensym*))
> (bind ?newnode2 (gensym*))
>
> I looked up gensym* and it is supposed to do the trick but I assume
> there is a problem with initialization because I don't see setgen. So I
> thought I'd add it somewhere but I don't know how to find the largest
> (node (name gen#)). What do I do? My only thought is to make a rule like
>
> defrule (find-unique-name
> (node (name (gensym*)))
> =
> (nil))
>
> Doesn't work throws a unimplemented function node at line 110 (my syntax
> is wrong no doubt). But in terms of the method:
> Is this the only way?
> Is there a better way?
> Would I need to set the salience of this rule to make it complete it's
> task before the main act starts?
> Is gensym* going to be incremented every time the inference engine tests
> this rule?
> Does that cause a possibility of and overflow?
>
> Nothing like a person who knows nothing too ask too many questions.
> Thanks for your patience.
> Best Regards,
> Matthew Denson
> Herbert Engineering Corp
> 415 296-0383 x108
>
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
>
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9214 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------