Evolution of the Rete Algorithm

on May 4, 2012
Rete Algorithm Evolution

Rete Algorithm Demystified: Part 3

The Rete Algorithm Demystified blog series attracted a huge crowd. I want to thank you for your readership! Therefore, I’d like to follow-up on the series and add a few words on the latest Rete algorithm evolution: Rete-NT.

What’s New? 

Unfortunately I can’t say much without violating confidentiality. However, there are a few things I can share. If you follow how the algorithm evolved, you’ll notice that Charles has improved speed with each iteration. With Rete-NT, Charles has found new ways to accelerate rule evaluations and reduce memory usage.

Even Faster: The speed increase in Rete III came with the ability to efficiently handle a larger number of objects per transaction. With Rete-NT, the speed increase comes from optimizations on complex “joints” in the Rete network.  As described in How the Rete Algorithm Works, the network joins objects across different classes to reflect dependences. The more rules you add, the more patterns the algorithm will uncover leading to increasingly more joins. This combinatorial effect is known as the problem of multi-patterns. The latest algorithm keeps this explosion under control, achieving unprecedented performance when business rules involve complex conditions.

Much Slimmer: How the combinatorial explosion is kept at bay significantly reduces memory usage. I wish I could say more because his approach is quite elegant and sophisticated! The important thing is that you need less memory which software architects will greatly appreciate.

Does Performance Matter Anymore?

At this point, most inference rules engines (Rete-based) have achieved excellent levels of runtime performance, so further enhancing performance isn’t necessarily a game-changer. However, why I’m excited about Rete-NT is that it significantly improves performance where it matters. Previous generations put more pressure of the rules authors. They had to do their best to avoid multi-patterns when designing rules. However, in my experience, especially during these past couple of years at Sparkling Logic, I have come across use cases where multi-patterns are unavoidable. Less efficient algorithms cannot handle the flexibility and expressibility needed.

What About Non-Inference Engines?

In general, you can simplify the inference versus non-inference debate to the following:

  • Inference wins when the number of rules is large and the number of objects in memory is small
  • Non-inference (sequential-based) wins when the number of rules is small and the number of objects in memory is large

By expanding the scope of problems that can be handled effectively, I believe Rete-NT tips the hat in favor of inference engines. Non-inference engines are dominating a smaller and smaller number of use cases, while inference engines keeps expanding.

Learn how Sparkling Logic’s SMARTS™ supports and executes Rete Inference Rules.

Search Posts by Category

ABOUT US

Sparkling Logic Inc. is a Silicon Valley-based company dedicated to helping organizations automate and optimize key decisions in daily business operations and customer interactions in a low-code, no-code environment. Our core product, SMARTS™ Data-Powered Decision Manager, is an all-in-one decision management platform designed for business analysts to quickly automate and continuously optimize complex operational decisions. Learn more by requesting a live demo or free trial today.