Forward Chaining vs Backward Chaining
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 d开发者_运维百科ata set or alternatives?
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.
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.
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]
- http://www.aaai.org/Papers/AAAI/1980/AAAI80-076.pdf
- https://www.amazon.com/Rule-Based-Expert-Systems-Addison-Wesley/dp/0201101726
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.
精彩评论