13.3 Expert Systems

We often rely on experts for their unique knowledge and understanding of a particular field. We go to a doctor when we have a health problem, an auto mechanic when our car won’t start, and an engineer when we need to build something.

A knowledge-based system is a software system that embodies and uses a specific set of information (organized data) from which it extracts and processes particular pieces. The terms expert system and knowledge-based system are often used interchangeably, although expert systems usually embody the knowledge of a specialized field, modeling the expertise of a professional in that field. A user consults an expert system when confronted with a particular problem, and the system uses its expertise to advise the user how to proceed.

An expert system uses a set of rules to guide its processing, so it is called a rule-based system. The set of rules in an expert system is referred to as its knowledge base. The inference engine is the part of the software that determines how the rules are followed and, therefore, which conclusions can be drawn.

A doctor is the living equivalent of an expert system. He or she gathers data by asking you questions and running tests. Your initial answers and the test results may lead to more questions and more tests. The rules embodied by the doctor’s knowledge allow him or her to know which questions to ask next. The doctor then uses the information to rule out various possibilities and eventually narrows the alternatives to a specific diagnosis. Once the problem is identified, that specific knowledge allows the doctor to suggest the appropriate treatment.

Let’s walk through an example of expert-system processing. Suppose you wanted to answer this question: What type of treatment should I put on my lawn?

An expert system that embodies the knowledge of a gardener would be able to guide you in this decision. Let’s define a few variables so that we can abbreviate the rules in our gardening system:

NONE—apply no treatment at this time
TURF—apply a turf-building treatment
WEED—apply a weed-killing treatment
BUG—apply a bug-killing treatment
FEED—apply a basic fertilizer treatment
WEEDFEED—apply a weed-killing and fertilizer combination treatment

These values represent various conclusions that the expert system might draw after analyzing the situation. The following Boolean variables represent the current state of the lawn:

BARE—the lawn has large, bare areas
SPARSE—the lawn is generally thin
WEEDS—the lawn contains many weeds
BUGS—the lawn shows evidence of bugs

We assume that initially the system has no direct data regarding the status of the lawn. The user would have to be questioned to determine, for instance, if the lawn has large, bare areas. Other data may be available directly to the system through some calculation or in some type of database:

LAST—the last date a lawn treatment was applied
CURRENT—the current date
SEASON—the current season

Now we can formulate some rules that our system can use to draw a conclusion. Rules take the form of if-then statements.

if (CURRENT - LAST < 30) then NONE
if (SEASON = winter) then not BUGS
if (BARE) then TURF
if (SPARSE and not WEEDS) then FEED
if (BUGS and not SPARSE) then BUG
if (WEEDS and not SPARSE) then WEED
if (WEEDS and SPARSE) then WEEDFEED

Note that this is only a sample of the types of rules that may exist in such a system. Real expert systems may incorporate thousands of rules to help analyze a situation. The rules presented here do not cover all situations, even in our small example.

When executed, the inference engine selects a rule to determine whether it is applicable. That determination may be made only by questioning the user. If it is applicable, that rule may affect the applicability of other rules. The inference engine continues to apply rules until no applicable rules remain. Don’t think of the rules as being a linear path (followed in sequence); instead, the inference engine applies whichever rules it can and continually loops until it reaches a conclusion.

An execution of our inference engine may result in the following interaction:

System: Does the lawn have large, bare areas?
User: No
System: Does the lawn show evidence of bugs?
User: No
System: Is the lawn generally thin?
User: Yes
System: Does the lawn contain significant weeds?
User: Yes
System: You should apply a weed-killing and fertilizer combination treatment.

Note that the system doesn’t ask about things it can look up, such as the date of the last treatment. And apparently our scenario didn’t take place in winter, because the system asked about a potential bug problem. If it had been winter, the bug issue would have already been eliminated.

An expert system has many advantages over other advising techniques. First, it is goal oriented: It doesn’t focus on abstract or theoretical information, but rather focuses on solving a specific problem. Second, it is efficient: It records previous responses and doesn’t ask irrelevant questions. Third, a real expert system, through a carefully constructed set of rules, can usually provide useful guidance even if you don’t know the answers to some questions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.220.120