Chapter 01
Chapter 01
Chapter 1:
• Learn the meaningg of an expert
p system
y
IIntroduction
d i to • Understand the problem domain and knowledge
domain
Expert Systems • Learn the advantages of an expert system
• Understand the stages in the development of an
expert system
Expert Systems: Principles and • Examine the general characteristics of an expert
system
Programming, Fourth Edition
3 4
1
What is artificial intelligence? What is artificial intelligence?
5 6
2
Expert system technology
Expert system
may include:
• Expert
p systems
y is a subfield of artificial • Special
p expert
p system
y languages
g g – CLIPS
intelligence that deal with restricted problem
domains. • Programs
• Used in medical disease diagnosis, business,
science, engineering, manufacturing, and many • Hardware designed to facilitate the
other fields. implementation of those systems
9 10
3
Problem Domain vs. Knowledge Figure 1.3 Problem and
Domain Knowledge Domain Relationship
• An expert
p system
y usuallyy solves pproblems in one
specific area called problem domain – e.g.
medicine, finance, science, engineering, etc.
• The expert system’s knowledge about solving
specific problems is called the knowledge
domain – e.g. infectious disease, physics, etc.
• The problem domain is always a superset of the
knowledge domain.
• In the knowledge domain, an expert system is as
good as or even better than the expert.
13 14
15 16
4
Representing the Knowledge Knowledge Engineering
5
Uncertainty Limitations of Expert Systems
Characteristics of an Expert
Limitations of Expert Systems
System
• Typical expert systems cannot generalize their g pperformance − the system’s
• High y performance
p
k
knowledge
l d through
th h analogy
l to
t reason about
b t new must equal to or exceed that of an expert.
situations in the way people can.
• Adequate response time − the expert system must
e.g. If you have flu, you should see a doctor =>
respond in a reasonable amount of time.
If you have medical problem, you should see a doctor
• Good reliability − the system must be reliable
• A knowledge acquisition bottleneck results from
and not pprone to crashes.
th time-consuming
the ti i andd labor
l b intensive
i t i taskt k off
transferring human knowledge into an expert • Understandable − the system should be capable
system. of verifying / explaining its reasoning.
– Repeated cycles of interviewing the expert, – To justify the conclusion
constructing a prototype and testing – To validate the accuracy of the knowledge
23 24
6
Table 1.3 – Broad Application
Early Expert Systems Classes of Expert Systems
• DENDRAL – used in analysisy of chemical mass
spectrogram to identify chemical constituents
• MYCIN – medical diagnosis of illness
• DIPMETER – geological data analysis for oil
• PROSPECTOR – geological data analysis for
minerals
• XCON/R1 – configuring DEC computer systems
25 26
7
Languages, Shells, and Tools Languages, Shells, and Tools
• Expert system languages are post 3rd generation. • Language
g g – a translator of commands in a specific
p
• Procedural languages (e.g., C – 3rd generation) syntax and an inference engine to execute the
focus on techniques to represent data (arrays, commands (AI, CLIPS).
trees, queues, …).
• Tool – language plus utility programs (editors,
• More modern languages (e.g., Java) focus on data
abstraction where data and methods are code generators, …) to facilitate the development,
encapsulated in objects.
objects gg g, and delivery
debugging, y of application
pp programs.
p g
• Expert system languages (e.g. CLIPS) focus on • Shell – special-purpose tool designed for certain
ways to represent knowledge. It also provides types of application in which the user must supply
object oriented programming features like C++ only the knowledge base (empty MYCIN).
for data abstraction.
29 30
31 32
8
Figure 1.6 Structure of a Production Rules
Rule-Based Expert System
• Knowledge is often represented as rules.
• Knowledge base is also called production
memory in a rule-based expert system.
• Production rules can be expressed in IF-
THEN pseudocode format.
– IF antecedent THEN consequent
• In rule-based systems, the inference engine
determines which rule antecedents are
satisfied by the facts.
33 34
• For example:
p • Forward chainingg – reasoningg from facts to the
conclusions resulting from those facts – best for
– Rule 1: IF the light is red THEN stop
prognosis, monitoring, and control.
– Rule 2: IF the light is green THEN go – E.g. If you know it is raining (fact), then you should
– Rule 3: IF the light is yellow THEN slow take an umbrella (conclusion).
down – CLIPS is designed
g for forward chainingg
– Fact (or pattern): the light is green
– Inference engine decides to use rule 2 (agenda)
– Conclusion/action: go
35 36
9
General Methods of Inferencing Production Systems
10
Post Production System Markov Algorithm
• For example:
p • It has control strategy
gy built into the algorithm.
g
– (1) car won’t start → check battery • An ordered group of productions applied in order
– (2) car won’t start → check gas of priority to an input string.
– (3) check battery AND battery bad → replace battery
• If the highest priority rule is not applicable, we
– (4) check gas AND no gas → fill gas tank apply the next, and so on.
– If fact = car won’t start, which rule should be used,
rule (1) or rule (2) ?
• Although it can be used as the basis of an expert
system, it is very inefficient for systems with
• Post production rules are not adequate for writing many rules – very slow and long response time.
practical programs without control strategy.
41 42
11
Figure 1.8 Procedural
Procedural Paradigms
Languages
• Two traditional programming paradigms:
– 1) procedural – implementation of an algorithm
– 2) nonprocedural – specifying the goal and let the
system determine how to accomplish it
• Algorithm – method of solving a problem in a
finite number of steps.
• Procedural programs are also called sequential
programs.
• The programmer specifies exactly how a problem
solution must be coded.
45 46
12
Figure 1.9 Nonprocedural
Nonprocedural Paradigms
Languages
• Do not depend on the programmer giving exact
details on how the program is to be solved,
focusing on what is to be accomplished – opposite
of procedural paradigms.
• Declarative programming – declare the goal, but
the method to achieve it is apart from the goal.
• Object-oriented programming – partly imperative
and partly declarative – uses objects and methods
that act on those objects.
• Inheritance – (OOP) subclasses derived from
parent classes.
49 50
13
Table 1.13 Traveling
ANS Characteristics
Salesman Problem
• Can solve a complex pattern recognition problem
– computing the shortest route through a given
list of cities, in short time (0.1 sec vs 1 hr).
– The # of routes = O((n-1)!) – combinatorial explosion
• ANS is similar to an analog computer using
simple processing elements connected in a highly
parallel manner.
• Processing elements perform Boolean /
arithmetic functions in the inputs
• Key feature is associating weights and threshold
with each element.
53 54
14
Figure 1.11 A Figure 1.12 Hopfield
Back-Propagation Net Artificial Neural Net
57 58
Advantages of ANS
Disadvantage of ANS
• Storage is fault tolerant – removal of portions of
net only degrades the quality of stored data.
• ANS are not well suited for number crunchingg or
• Quality of stored data degrades gracefully in
proportion to the amount of net removed. problems requiring optimum solution.
• Nets can extrapolate and interpolate from their
stored information.
• Nets have plasticity – even if some neurons are
removed,, the net can be retrained to its original
g
skill level if enough neurons remain – low
maintenance costs.
• Excellent when functionality is needed for long
time w/o repair in a hostile environment (e.g.
robot spacecraft, underwater devices, …) 59 60
15
MACIE Summary
• An inference engine
g called MACIE ((Matrix • During the 20th Century various definitions of AI
Controlled Inference Engine) uses ANS were proposed.d
knowledge base. • In the 1960s, a special type of AI called expert
systems were developed to deal with complex
• Designed to classify disease from symptoms into problems in a narrow domain, e.g., medical
one of the known diseases the system has been disease diagnosis.
trained on. • Today, expert systems are used in a variety of
• MACIE uses forward chaining to make fields: business, science, engineering,
inferences and backward chaining to query user manufacturing, …
for additional data to reach conclusions. • Expert systems solve problems for which there
are no known algorithms.
61 62
• Expert
p systems
y are knowledge-based
g – effective • What is the role of an inference engine?
for solving real-world problems. • What are production rules?
• Expert systems are not suited for all applications.
• Future advances in expert systems will hinge on • What is the difference between forward
the new quantum computers, as well as those and backward chaining?
usingg massive computational
p abilities byy linkingg
• What is the difference between procedural
up millions of computers on the Internet using
the Grid, and biological wetlab using strands of languages and nonprocedural languages?
RNA.
63 64
16