I think Sebastian Varges wrote:
> Hi Ejfried,

Hi [EMAIL PROTECTED],

> 
> I'm trying to understand why the Rete network looks the way it
> does... Now, I understand that join nodes are necessary in cases where
> variables are shared between patterns in a rule. But this is not the
> case here. So why not just something like the following for the simple
> rule above:
>                               start
>                           /  /  |  \  \
>                           a  b  c  d  e
>                           \  \  |  /  /
>                           FIRE: rule-4
> 
> The single nodes would have a memory, and that's it. 


Well, even for your very simple example, your "rule-4" node above has
to do some bookkeeping. It has to know has to know it has five inputs,
and when a fact has been asserted on each of its five inputs, and it
it has to somehow be able to tell the inputs apart. It also has to do
this all rather efficiently. It's not an impossible job, but think
about what a generic version of this would look like -- remember that
it has to be created by a rule compiler, not by a human.

Now, make your sample problem just a little bit more complex: one or
more of the input facts can look like (a 1) or (a 2) instead of just
(a). Now in your proposed scheme the rule node would have to keep
track of all the permutations of possible inputs, because it needs to
know which permuations have been fired already, and which haven't.  It
would have to be able to decide if a particular permutation was
already in the list, and find permutations if it was necesasary to
retract them. These lookups need to be very fast, so each of the five
inputs would need a sophisticated indexer, and then of course there
would need to be structures to hold and index the
permutations... very quickly, the rule node would need to contain all
of the internal structure that is built up as the Rete network.


>(I found the
> mention of `alpha nodes' for one-input nodes, but does JESS have any?)

Not sure what the term "alpha nodes" refers to; there are alpha and
beta memories in the join nodes.



> BTW: the useful (matches) function does not seem to work properly in
> Jess 6.0a2 what I'm still using; does it in 6.0b1? 

Well, I guess I'm not sure -- that depends on what you perceive as
being wrong with in Jess 6.0a2. Please let me know.


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [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 (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to