Hi Venkat,

Well, in broad strokes, Rete helps if there are many 'facts', only a
percentage of which change on each iteration of the system, and which
must be used in combination to determine whether the rules apply. The
applicability of Rete has little or nothing to do with the size of the
rulebase - it really has to do with the size of the fact base. So, for
example, if your 30 rules make decisions based on a very small pool of
information, or if most of the information changes constantly, then
Rete probably won't help. On the other hand, if the rules act on a
large number of inputs, each of which changes only occasionally, then
Rete is a big win.

An example of an unnecessary Rete application is one where a small
group of inputs are used separately to make a set of decoupled decisions:

if (item.price < 10)
   then item.description += cheap;
else
   item.description += expensive;

if (item.color is "red")
   then item.description += favorite;
else
   item.description += ugly;


An example of a good Rete application is one where inputs are used
together to make a set of coupled decisions (given that there is a
large set of items, and only a small percentage of items are added or
removed on each iteration)

if (item1.price < 10 && item1.color is red && item2.color is black &&
    item2.material is leather) 
then buy-both(item1, item2)

For the if-then version of this last problem, the computational
complexity is of the order of O(RF^P), where R is the number of rules,
F is the number of items, and P is the number of items tested in a rule. For
1 rule, 100 items, 2 items tested per rule, this is ~10000. For the
Rete version, the complexity is more like O(RFP), or ~200. Rete can
make a huge difference even for one rule; here it's 50 times as
efficient. For more complex rules, this difference can quickly become
even more pronounced.
   
I think Venkat wrote:
> 
> If i have not more than 30 rules to encode, what are
> the advantages I have in using Jess over the normal
> if-then-else structure in Java - i am aware that the
> Expert system shell uses Rete Algorithm for Rule processing,
> I would like to know  how far will the use of Jess aid
> in efficiency for a smaller rule base.
> 
> If anyone has done this analysis before, I would be thankful
> if you share your experiences.
> 
> - venkat
> ---------------------------------------------------------------------
> 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: (510) 294-2154
Sandia National Labs                FAX:   (510) 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]
---------------------------------------------------------------------

Reply via email to