Sometimes you are not interested in the complete ripple effect of input data. You may want to focus on a given outcome and be satisfied as soon as a particular attribute is assigned a value. In that case, you should use the backwardchain command to invoke the inference engine.
For example, our loan processing application can be written using either forward chaining or backward chaining. If you want to find all the "weak spots" in the loan requester's profile, you should use forward chaining. A mortgage broker would be interested in this information, so he/she could detail to his/her client all the factors that led to a loan rejection. The client could then determine whether certain factors (such as other outstanding debt) could be modified.
On the other hand, the bank's loan officer might simply want to know whether the current loan profile qualifies or not. A single disqualifying factor would be enough to cause the loan request to be rejected. Thus, a forward chaining command that exhausted all the rules would be inefficient.
The application should use the language keyword backwardchain, with a goal attribute of Approve. The inference engine examines rules to find one that assigns a value to Approve. If the rule cannot be fired because of an incomplete premise, the inference engine tries to form a chain of rules that leads to this rule. As soon as a value for Approve is determined, the inference engine stops.
Inferencing that employs backward chaining has the following characteristics:
| Copyright © 2009 CA. All rights reserved. | Send E-mail to CA about this topic |