You are on page 1of 35

Lecture 1:

Introduction to
Expert Systems

KNOWLEDGE BASED
EXPERT SYSTEM
2/17/2019 1
Objectives

• Learn the meaning of an expert system


• Understand the problem domain and knowledge
domain
• Learn the advantages of an expert system
• Understand the stages in the development of an
expert system
• Examine the general characteristics of an expert
system

2/17/2019 2
Objectives
• Examine earlier expert systems which have given
rise to today’s knowledge-based systems
• Explore the applications of expert systems in use
today
• Examine the structure of a rule-based expert
system
• Learn the difference between procedural and
nonprocedural paradigms
• What are the characteristics of artificial neural
systems
2/17/2019 3
What is an expert system?

“An expert system is a computer system


that emulates, or acts in all respects, with
the decision-making capabilities of a human
expert.”
Professor Edward Feigenbaum
Stanford University

• Expert Systems = knowledge-based systems


= knowledge-based expert systems
2/17/2019 4
What is an expert system?
• Emulation (mimics cause/process) is stronger than
simulation (mimics outward appearance) which is
required to act like the real thing in only some
aspects.
• The basic idea is that if a human expert can specify
the steps of reasoning by which a problem may be
solved, so too can an expert system.
• Restricted domain expert systems (extensive use of
specialized knowledge at the level of human expert)
function well which is not the case of general-
purpose problem solver.
• Knowledge based system are designed to act as an
2/17/2019 intelligent systems. 5
Expert system technology
may include:
• Special expert system languages – CLIPS

• Programs

• Hardware designed to facilitate the


implementation of those systems (e.g., in
medicine)

2/17/2019 6
Expert System Main Components

• Knowledge base – obtainable from books,


magazines, knowledgeable persons, etc; or
expertise knowledge.

• Inference engine – draws conclusions from the


knowledge base.

2/17/2019 7
Basic Functions of Expert Systems

2/17/2019 8
Problem Domain vs. Knowledge
Domain
• In general, the first step in solving any problem is
defining the problem area or domain to be solved.
• An expert’s knowledge is specific to one problem
domain – medicine, finance, science, engineering,
etc.
• The expert’s knowledge about solving specific
problems is called the knowledge domain.
• The problem domain is always a superset of the
knowledge domain.
• Expert system reasons from knowledge domain.
2/17/2019 9
Problem Domain vs. Knowledge Domain

• Example: infections diseases diagnostic system


does not have (or require) knowledge about other
branches such as surgery.

• In the knowledge domain that it knows about, the


expert system reasons or make inferences as a
human expert would reason.

2/17/2019 10
Problem and Knowledge
Domain Relationship

2/17/2019 11
Advantages of Expert Systems
• Increased availability: on suitable computer hardware

• Reduced cost

• Reduced danger: can be used in hazardous environment.

• Permanence: last for ever, unlike human who may die,


retire, quit.
• Multiple expertise: several experts’ knowledge leads to
• Increased reliability
2/17/2019 12
Advantages Continued
• Explanation: explain in detail how arrived at
conclusions.

• Fast response: (e.g. emergency situations).


• Steady, unemotional, and complete responses at all
times: unlike human who may be inefficient because
of stress or fatigue.
• Intelligent tutor: provides direct instructions (student
may run sample programs and explaining the system’s
reasoning).
• Intelligent database: access a database intelligently
(e.g. data mining).
2/17/2019 13
Representing the Knowledge

The knowledge of an expert system can be


represented in a number of ways, including IF-
THEN rules:

IF the light is red THEN stop

2/17/2019 14
Representing the Knowledge
Car Failure Diagnosis
IF the selection is 2 "Run-Stable State"
AND the fuel is not burning well
AND the engine running cycle is ok
AND there is no blue gas
AND the advance is bad
THEN
There is a Dirt in the injections/carburetor
or The adjustment of ear and gasoline is
not good, clear injections/carburetor and
adjust the ear.
2/17/2019 15
Knowledge Engineering

The process of building an expert system:

1. The knowledge engineer establishes a dialog


with the human expert to elicit knowledge.
2. The knowledge engineer codes the knowledge
explicitly in the knowledge base.
3. The expert evaluates the expert system and
gives a critique to the knowledge engineer.

2/17/2019 16
Development of an Expert System

2/17/2019 17
The Role of AI

• An algorithm is an ideal solution guaranteed to


yield a solution in a finite amount of time.
• When an algorithm is not available or is
insufficient, we rely on artificial intelligence
(AI).
• Expert system relies on inference – we accept a
“reasonable solution.”
• Explanation facility – what-if questions ->
hypothetical reasoning.
2/17/2019 18
Limitations of Expert Systems
• Uncertainty = having limited knowledge (more
than possible outcomes)
• Both human experts and expert systems must be
able to deal with uncertainty.
• Limitation 1: most expert systems deals with
shallow knowledge than with deep knowledge.
• Shallow knowledge – based on empirical and
heuristic knowledge. (aspirin for headache.)
• Deep knowledge – based on basic structure,
function, and behavior of objects.
2/17/2019 19
Limitations of Expert Systems

• Limitation 2: typical expert systems cannot


generalize through analogy to reason about new
situations in the way people can.
• Solution 1 for limitation 2: repeating the cycle of
interviewing the expert.
• Limitation raised form Solution 1: A knowledge
acquisition bottleneck results from the time-
consuming and labor intensive task of building an
expert system.

2/17/2019 20
Early Expert Systems

• DENDRAL – used in chemical mass


spectroscopy to identify chemical constituents
• MYCIN – medical diagnosis of illness
• DIPMETER – geological data analysis for oil
• PROSPECTOR – geological data analysis for
minerals
• XCON/R1 – configuring computer systems

2/17/2019 21
Broad Classes of Expert Systems

2/17/2019 22
Problems with Algorithmic
Solutions
• Conventional computer programs generally solve
problems having algorithmic solutions.

• Algorithmic languages include C, Java, and C#.

• Classic AI languages include LISP and


PROLOG.

2/17/2019 23
Considerations for Building Expert
Systems
• Can the problem be solved effectively by
conventional programming? (expert systems are
suited for ill-structured problems- problems with no
efficient algorithmic solution)
• Is there a need and a desire for an expert system?
• Is there at least one human expert who is willing to
cooperate?
• Can the expert explain the knowledge to the
knowledge engineer in a way that can understand it.
• Is the problem-solving knowledge mainly heuristic
2/17/2019 and uncertain? 24
Languages, Shells, and Tools

• Expert system languages (e.g. CLIPS) focus on


ways to represent knowledge.
• Tool = language + utility program (code generator,
graphics editor, debuggers, etc.).
• Shell: is a special purpose tool designed for certain
types of applications in which the user must supply
the knowledge base. Example, EMYCIN (empty
MYCIN)

2/17/2019 25
Elements of an Expert System

• User interface – mechanism by which user and


system communicate.
• Exploration facility – explains reasoning of
expert system to user.
• Working memory – global database of facts used
by rules.
• Inference engine – makes inferences deciding
which rules are satisfied and prioritizing.

2/17/2019 26
Elements Continued

• Agenda – a prioritized list of rules created by the


inference engine, whose patterns are satisfied by
facts or objects in working memory.
• Knowledge acquisition facility – automatic way
for the user to enter knowledge in the system
bypassing the explicit coding by knowledge
engineer.

2/17/2019 27
Structure of a
Rule-Based Expert System

2/17/2019 28
Production Rules

• Knowledge base is also called production


memory.

• Production rules can be expressed in IF-THEN


pseudocode format.

• In rule-based systems, the inference engine


determines which rule antecedents are satisfied
by the facts.
2/17/2019 29
Inference engine operates on
recognize-act cycle
While not done
conflict resolution:
act:
match:
check for halt:
End-while

2/17/2019 30
Inference engine operates on
recognize-act cycle
- conflict resolution: if there are activations then
select the one with the highest priority. Else done.
- act: sequentially perform the actions. Update the
working memory. Remove the fired activations.
- match: Update the agenda by checking if there
are activation or remove activations if there LHS
is no longer satisfied.
- check for halt: if an halt action is performed or
break command given, then done.

2/17/2019 31
General Methods of Inference
• Forward chaining – reasoning from facts to the
conclusions resulting from those facts – best for
prognosis, monitoring, and control.

• Backward chaining – reasoning in reverse from a


hypothesis, a potential conclusion to be proved to
the facts that support the hypothesis – best for
diagnosis problems.

2/17/2019 32
Production Systems

• Rule-based expert systems – most popular type


today.
• Knowledge is represented as multiple rules that
specify what should/not be concluded from
different situations.
• Forward chaining – start w/facts and use rules do
draw conclusions/take actions.
• Backward chaining – start w/hypothesis and look
for rules that allow hypothesis to be proven true.
2/17/2019 33
- Post Production System
• Basic idea – any mathematical / logical system is
simply a set of rules specifying how to change
one string of symbols into another string of
symbols.
• Basic limitation – lack of control mechanism to
guide the application of the rules.
– Car won’t start  check battery
– Car won’t start  check gas
– Check battery and battery bad  replace gas
– Check gas AND no gas  fill gas tank
2/17/2019 34
2/17/2019 35

You might also like