Forward Chaining vs Backward Chaining

59,179

Solution 1

Backward chaining (a la Prolog) is more like finding what initial conditions form a path to your goal. At a very basic level it is a backward search from your goal to find conditions that will fulfil it.

Backward chaining is used for interrogative applications (finding items that fulfil certain criteria) - one commercial example of a backward chaining application might be finding which insurance policies are covered by a particular reinsurance contract.

Forward chaining (a la CLIPS) matches conditions and then generates inferences from those conditions. These conditions can in turn match other rules. Basically, this takes a set of initial conditions and then draws all inferences it can from those conditions.

The inferences (if asserted) can also be actions or events that can trigger external actions. This is useful in event driven systems, as the rule sets can be configured to (for example) initiate a workflow or some other action. This type of rule engine is the most commonly used in commercial applications.

Event driven systems are a common application of forward chaining rule engines. One example of a forward chaining application might be a telecoms plan provisioning engine (typically used for administering mobile phone plans). Entering a particular user with a particular plan will trigger a range of items to be set up in various phone switches, billing systems, financials, CRM systems etc.

Solution 2

Concerned's answer is very good. When asked to boil the difference down to a sound bite, I usually say something like:

Lots of Output Hypotheses + Lots of Data Up Front => Use Forward Chaining

Fewer Output Hypotheses + Must Query for Data => Use Backward Chaining

But it's just a rule of thumb, not a commandment.

Solution 3

In the old old old old expert systems days they used to say forward chaining was good for looking around (checking for what could be) while backward chaining was good for confirming (checking if "it" really is).

Think configuration (forward chaining, XCON [1]) and medical diagnosis (MYCIN) [2]

  1. http://www.aaai.org/Papers/AAAI/1980/AAAI80-076.pdf
  2. https://www.amazon.com/Rule-Based-Expert-Systems-Addison-Wesley/dp/0201101726

Solution 4

Forward chaining is concerned with the question "what will happen next?", while backward chaining looks at the question "why did this happen?".

An example of forward chaining is predicting whether share market status has an effect on changes in interest rates.

An example of backward chaining is the diagnosing of blood cancer in humans.

Simply put, forward chaining is mainly used for predicting future outcomes while backward chaining is mainly used for analyzing historical data.

Share:
59,179

Related videos on Youtube

gtrak
Author by

gtrak

I'm a programmer guy. I studied for a while at Georgia Tech, now I code for pleasure and profit. Interested in clojure, concurrency, visualization, distributed-systems, and I currently work for Allovue in Baltimore.

Updated on February 02, 2020

Comments

  • gtrak
    gtrak over 4 years

    What is one good for that the other's not in practice? I understand the theory of what they do, but what are their limitations and capabilities in practical use? I'm considering Drools vs a java prolog for a new AI project, but open to other suggestions. What are some popular approaches for inferencing on a complicated relational data set or alternatives?

  • AaronLS
    AaronLS over 11 years
    FYI Drools does both apparently(assuming these features were completed): jbug.jp/trans/jboss-rules3.0.2/ja/html/ch01.html
  • Toaster
    Toaster almost 10 years
    Using forward chaining alone raises the question of the advantages over a simple scripting language.