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.

BUY SMART: A FRAME-BASED EXPERT SYSTEM<br />

149<br />

cases that are not represented in the rule base. However, it is not necessary<br />

always <strong>to</strong> rely on a set <strong>of</strong> rules. We can use the WHEN NEEDED method <strong>to</strong><br />

establish the attribute value.<br />

The WHEN NEEDED method shown in Figure 5.10 is attached <strong>to</strong> the attribute<br />

Evaluation. The inference engine executes this method when it needs <strong>to</strong><br />

determine the value <strong>of</strong> Evaluation. When the WHEN NEEDED method is<br />

executed, the attribute Evaluation receives the value Consult a superior.<br />

How does the inference engine know where, and in what order, <strong>to</strong> obtain<br />

the value <strong>of</strong> an attribute?<br />

In our case, if the WHEN NEEDED method were executed first, the attribute<br />

Evaluation would always receive the value Consult a superior, and no rules would<br />

ever be fired. Thus, the inference engine has <strong>to</strong> obtain the value from the WHEN<br />

NEEDED method only if it has not been determined from the rule base. In other<br />

words, the search order for the attribute value has <strong>to</strong> be determined first. It can<br />

be done, for example, by means <strong>of</strong> the SEARCH ORDER facet attached <strong>to</strong> an<br />

attribute that tells the inference engine where, and in what order, <strong>to</strong> obtain the<br />

value <strong>of</strong> this attribute.<br />

In Level5 Object, a search order can be specified for every attribute, and in our<br />

credit evaluation example, we set the search order for the Evaluation value <strong>to</strong><br />

RULES, WHEN NEEDED. It makes certain that the inference engine starts the<br />

search from the rule base.<br />

5.6 Buy Smart: a frame-based expert system<br />

To illustrate the ideas discussed above, we consider a simple frame-based expert<br />

system, Buy Smart, which advises property buyers.<br />

We will review the main steps in developing frame-based systems, and show<br />

how <strong>to</strong> use methods and demons <strong>to</strong> bring frames <strong>to</strong> life. To aid us in this effort<br />

we will use the Level5 Object expert system shell.<br />

Are there any differences between the main steps in building a rule-based<br />

expert system and a frame-based one?<br />

The basic steps are essentially the same. First, the knowledge engineer needs <strong>to</strong><br />

obtain a general understanding <strong>of</strong> the problem and the overall knowledge<br />

structure. He or she then decides which expert system <strong>to</strong>ol <strong>to</strong> use for developing<br />

a pro<strong>to</strong>type system. Then the knowledge engineer actually creates the knowledge<br />

base and tests it by running a number <strong>of</strong> consultations. And finally, the expert<br />

system is expanded, tested and revised until it does what the user wants it <strong>to</strong> do.<br />

The principal difference between the design <strong>of</strong> a rule-based expert system and<br />

a frame-based one lies in how the knowledge is viewed and represented in the<br />

system.<br />

In a rule-based system, a set <strong>of</strong> rules represents the domain knowledge useful<br />

for problem solving. Each rule captures some heuristic <strong>of</strong> the problem, and each<br />

new rule adds some new knowledge and thus makes the system smarter. The rulebased<br />

system can easily be modified by changing, adding or subtracting rules.

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

Saved successfully!

Ooh no, something went wrong!