Professional Documents
Culture Documents
Expert Systems and AI: Example
Expert Systems and AI: Example
During the past decade the interest in the results of artificial intelligence research has been
growing to an increasing extent. In particular, the area of knowledge-based systems, one of
the first areas of artificial intelligence to be commercially fruitful, has received a lot of
attention.
The phrase knowledge-based system is generally employed to indicate information systems
in which some symbolic representation of human knowledge is applied, usually in a way
resembling human reasoning.
Expert systems are systems which are capable of offering solutions to specific problems in a
given domain or which are able to give advice, both in a way and at a level comparable to
that of experts in the field.
Building expert systems for specific application domains has even become a separate subject
known as knowledge engineering.
The early areas of attention in the fifties were theorem proving and problem solving. In both
fields, the developed computer programs are characterized by being based on complex
algorithms which have a general solving capability, independent of a specific problem
domain and which furthermore operate on problems posed in rather simple primitives.
The early areas of attention in the fifties were theorem proving and problem solving. In both
fields, the developed computer programs are characterized by being based on complex
algorithms which have a general solving capability, independent of a specific problem
domain and which furthermore operate on problems posed in rather simple primitives.
Theorem proving is the field concerned with proving theorems automatically from a given
set of axioms by a computer. The theorems and axioms are expressed in logic, and logical
inference rules are applied to the given set of axioms in order to prove the theorems.
Example
The best-known expert system in medicine, developed in the seventies, is MYCIN.
The MYCIN system is able to assist internists in the diagnosis and the treatment of a number
of infectious diseases, in particular meningitis and bacterial septicaemia. When a patient
shows the signs of such an infectious disease, usually a culture of blood and urine is made in
order to determine the bacterium species that causes the infection. Generally, it takes 24 to
48 hours before the laboratory results become known. In case of the above mentioned
infectious diseases however, the physician will have to start treatment before these results
are available, since otherwise the disease may progress and actually cause death of the
patient. Given the patient data that are available to the system but which are apt to be
incomplete and inexact MYCIN gives an interim indication of the organisms that are most
likely to be the cause of the infection. Given this indication, MYCIN advises the
administration of a number of drugs that should control the disease by suppressing the
indicated organisms. The interaction of the prescribed drugs among themselves and with the
drugs the patient already takes, possible toxic drug reactions, etc. are also taken into
account. Moreover, MYCIN is able to comment on the diagnosis it has arrived at, and the
prescription of the drugs.
Expert Systems
An expert system is an AI software that uses knowledge stored in a knowledge base to solve
problems that would usually require a human expert thus preserving a human expert’s knowledge in
its knowledge base. They can advise users as well as provide explanations to them about how they
reached a particular conclusion or advice.
Knowledge base: The knowledge base represents facts and rules. It consists of knowledge in
a particular domain as well as rules to solve a problem, procedures and intrinsic data
relevant to the domain.
Inference engine: The function of the inference engine is to fetch the relevant knowledge
from the knowledge base, interpret it and to find a solution relevant to the user’s problem.
The inference engine acquires the rules from its knowledge base and applies them to the
known facts to infer new facts. Inference engines can also include an explanation and
debugging abilities.
Knowledge acquisition and learning module: The function of this component is to allow the
expert system to acquire more and more knowledge from various sources and store it in the
knowledge base.
User interface: This module makes it possible for a non-expert user to interact with the
expert system and find a solution to the problem.
Explanation module: This module helps the expert system to give the user an explanation
about how the expert system reached a particular conclusion.
Limitations:
Advantages:
Low accessibility cost.
Fast response.
Not affected by emotions unlike humans.
Low error rate.
Capable of explaining how they reached a solution.
Disadvantages:
Any rule consists of two parts: the IF part, called the antecedent (premise or condition) and the
THEN part called the consequent (conclusion or action).
In general, a rule can have multiple antecedents joined by the keywords AND (conjunction), OR
(disjunction) or a combination of both. However, it is a good habit to avoid mixing conjunctions and
disjunctions in the same rule.
IF the ‘traffic light’ is green
THEN the action is go
IF the ‘traffic light’ is red
THEN the action is stop
These statements represented in the IF-THEN form are called production rules or just rules. The term
‘rule’ in AI, which is the most commonly used type of knowledge representation, can be defined as
an IF-THEN structure that relates given information or facts in the IF part to some action in the THEN
part. A rule provides some description of how to solve a problem. Rules are relatively easy to create
and understand.
The antecedent of a rule incorporates two parts: an object (linguistic object) and its value. In our
road crossing example, the linguistic object ‘traffic light’ can take either the value green or the value
red. The object and its value are linked by an operator. The operator identifies the object and assigns
the value.
Operators such as is, are, is not, are not are used to assign a symbolic value to a linguistic object. But
expert systems can also use mathematical operators to define an object as numerical and assign it to
the numerical value. For example,
IF ‘age of the customer’ < 18
AND ‘cash withdrawal’ > 1000
THEN ‘signature of the parent’ is required
Rules can represent relations, recommendations, directives, strategies and heuristics (Durkin, 1994).
Relation
IF the ‘fuel tank’ is empty
THEN the car is dead
Recommendation
IF the season is autumn
AND the sky is cloudy
AND the forecast is drizzle
THEN the advice is ‘take an umbrella’
Directive
IF the car is dead
AND the ‘fuel tank’ is empty
THEN the action is ‘refuel the car’
Strategy
IF the car is dead
THEN the action is ‘check the fuel tank’;
step1 is complete
IF step1 is complete
AND the ‘fuel tank’ is full
THEN the action is ‘check the battery’;
step2 is complete
Heuristic
IF the spill is liquid
AND the ‘spill pH’ < 6
AND the ‘spill smell’ is vinegar
THEN the ‘spill material’ is ‘acetic acid’
Structure of a rule-based expert system
A rule-based expert system has five components: the knowledge base, the database, the inference
engine, the explanation facilities, and the user interface.
The knowledge base contains the domain knowledge useful for problem solving. In a rule-based
expert system, the knowledge is represented as a set of rules. Each rule specifies a relation,
recommendation, directive, strategy or heuristic and has the IF (condition) THEN (action) structure.
When the condition
part of a rule is satisfied, the rule is said to fire and the action part is executed.
The database includes a set of facts used to match against the IF (condition) parts of rules stored in
the knowledge base.
The inference engine carries out the reasoning whereby the expert system reaches a solution. It links
the rules given in the knowledge base with the facts provided in the database. The knowledge base
contains the domain knowledge useful for problem solving. In a rule-based expert system, the
knowledge is represented as a set of rules. Each rule specifies a relation, recommendation, directive,
strategy or heuristic and has the IF (condition) THEN (action) structure. When the condition part of a
rule is satisfied, the rule is said to fire and the action part is executed.
The database includes a set of facts used to match against the IF (condition) parts of rules stored in
the knowledge base.
The inference engine carries out the reasoning whereby the expert system reaches a solution. It links
the rules given in the knowledge base with the facts provided in the database.
The explanation facilities enable the user to ask the expert system how a particular conclusion is
reached and why a specific fact is needed. An expert system must be able to explain its reasoning
and justify its advice, analysis or conclusion.
The user interface is the means of communication between a user seeking a solution to the problem
and an expert system. The communication should be as meaningful and friendly as possible. These
five components are essential for any rule-based expert system. They constitute its core, but there
may be a few additional components.
The external interface allows an expert system to work with external data files and programs written
in conventional programming languages such as C, Pascal, FORTRAN and Basic.