26.12.2013 Views

AI - a Guide to Intelligent Systems.pdf - Member of EEPIS

AI - a Guide to Intelligent Systems.pdf - Member of EEPIS

AI - a Guide to Intelligent Systems.pdf - Member of EEPIS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INTERACTION OF FRAMES AND RULES<br />

147<br />

Figure 5.10<br />

The Credit Evaluation class, WHEN CHANGED and WHEN NEEDED methods<br />

Suppose we want <strong>to</strong> evaluate the credit request selected by the user. The<br />

expert system is expected <strong>to</strong> begin the evaluation when the user clicks the<br />

Evaluate Credit pushbut<strong>to</strong>n on the input display. This pushbut<strong>to</strong>n is attached <strong>to</strong><br />

the attribute Evaluate Credit <strong>of</strong> the class Credit Evaluation shown in Figure 5.10.<br />

The attribute Evaluate Credit has the WHEN CHANGED method attached <strong>to</strong> it,<br />

and when we select the Evaluate Credit pushbut<strong>to</strong>n at run time, the attribute<br />

Evaluate Credit receives a new value, a value <strong>of</strong> TRUE. This change causes the<br />

WHEN CHANGED method <strong>to</strong> execute. The PURSUE command tells Level5 Object<br />

<strong>to</strong> establish the value <strong>of</strong> the attribute Evaluation <strong>of</strong> the class Credit Evaluation. A<br />

simple set <strong>of</strong> rules shown in Figure 5.11 is used <strong>to</strong> determine the attribute’s value.<br />

How does the inference engine work here?<br />

Based on the goal, Evaluation OF Credit Evaluation, the inference engine finds<br />

those rules whose consequents contain the goal <strong>of</strong> interest and examines them<br />

one at a time in the order in which they appear in the rule base. That is,<br />

the inference engine starts with RULE 9 and attempts <strong>to</strong> establish whether the<br />

attribute Evaluation receives the Give credit value. This is done by examining<br />

the validity <strong>of</strong> each antecedent <strong>of</strong> the rule. In other words, the inference engine<br />

attempts <strong>to</strong> determine first whether the attribute Collateral has the value <strong>of</strong><br />

Excellent, and next whether the attribute Financial rating is Excellent. To determine<br />

whether Collateral OF Credit Evaluation is Excellent, the inference engine<br />

examines RULE 1 and RULE 2, and <strong>to</strong> determine whether Financial rating OF<br />

Credit Evaluation is Excellent, it looks at RULE 8. If all <strong>of</strong> the rule antecedents are<br />

valid, then the inference engine will conclude that Evaluation OF Credit Evaluation<br />

is Give credit. However, if any <strong>of</strong> the antecedents are invalid, then the<br />

conclusion is invalid. In this case, the inference engine will examine the next<br />

rule, RULE 10, which can establish a value for the attribute Evaluation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!