0% found this document useful (0 votes)
39 views16 pages

Chapter 01

This document discusses the objectives and key concepts of expert systems. It aims to introduce expert systems, define what they are, explain their main components and knowledge representation methods, examine their advantages, and outline the process of building an expert system through knowledge engineering. The overall goal is to help readers understand expert systems at a high level and lay the foundation for further exploration of their principles and programming.

Uploaded by

olujobi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views16 pages

Chapter 01

This document discusses the objectives and key concepts of expert systems. It aims to introduce expert systems, define what they are, explain their main components and knowledge representation methods, examine their advantages, and outline the process of building an expert system through knowledge engineering. The overall goal is to help readers understand expert systems at a high level and lay the foundation for further exploration of their principles and programming.

Uploaded by

olujobi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Objectives

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

Objectives What is artificial intelligence?


• Examine earlier expert systems which have given • The most ppopular
p definition for artificial
rise to today’s knowledge-based systems intelligence (AI) is still: “making computers think
• Explore the applications of expert systems in use like people.”
today
• Examine the structure of a rule-based expert • Other definitions of AI:
system – The study and design of intelligent agents or
• Learn
L the
th difference
diff between
b t procedural
d l andd rational
ti l agents
t
nonprocedural paradigms
• What are the characteristics of artificial neural – The science and engineering of making
systems intelligent machines

3 4

1
What is artificial intelligence? What is artificial intelligence?

• The meaningg of intelligence


g is not well-defined. • General intelligence
g or strongg AI refers to artificial
Some definitions follow: intelligence that matches or exceeds human
intelligence.
– The capacity to learn, acquire, modify, and
extend knowledge in order to solve problems • Strong AI has not yet been achieved.
• Weak AI means some “thinking-like” features are
– The capacity to learn, to reason, to solve p
added to computers to make them more useful
problem,
bl to
t perceive
i andd tot understand
d t d tools.
languages
• E.g. : expert systems, drive-by-wire cars and
speech recognition software

5 6

Fig 1.1 Areas of Artificial


What is an expert system?
Intelligence
Human expert
p has expertise
p in a certain area and
can solve problems others can’t solve at all or
can’t solve efficiently.

“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
7 8

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

Figure 1.2 Basic Functions


Expert System Main Components
of Expert Systems
• Knowledge base – stores expertise elicited from
expert(s) or knowledge obtained from books,
magazines, knowledgeable persons, etc.
– The terms expert system and knowledge-based system
are often used synonymously
• Inference engine – draws conclusions from the
knowledge base

• The user supplies facts or other information to


the system and receives expert advice or
expertise in response
11 12

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

Advantages of Expert Systems Advantages Continued

• Increased availabilityy • Explanation


p
• Reduced cost • Fast response – usually faster than human
• Reduced danger
• Steady, unemotional, and complete responses at
• Performance – the expertise will last forever all times

• Multiple expertise combined from several experts • Intelligent tutor


• Increased reliability – means of 2nd opinion • Intelligent database – e.g. data mining

15 16

4
Representing the Knowledge Knowledge Engineering

The knowledgeg of an expert


p system
y can be The p
process of building
g an expert
p system
y is called
represented in a number of ways (chap. 2), knowledge engineering and is done by a knowledge
including IF-THEN rules: engineer:

1. The knowledge engineer establishes a dialog


IF you are hungry THEN eat
with the human expert to elicit knowledge.
2 The
2. Th knowledge
k l d engineer
i codes
d the
th knowledge
k l d
explicitly in the knowledge base.
3. The expert evaluates the expert system and
gives a critique to the knowledge engineer.
17 18

Development of an Expert System The Role of AI


• An algorithm is an ideal solution guaranteed to
yield a solution in a finite amount of time (e.g.
find class average grade)
• Not all problems can be solved with algorithms
(e.g. chess program). When an algorithm is not
available or is insufficient, we rely on artificial
intelligence
e ge ce (AI).
( ).
• AI will give a “reasonable solution”, not an
optimum solution.
• Since expert system relies on inference (chap. 3),
it must be able to explain its reasoning.
19 20

5
Uncertainty Limitations of Expert Systems

• One of the strengths


g of an expert
p system
y is • It is easier to pprogram
g expert
p systems
y with
its ability to handle uncertainty just like a shallow knowledge than with deep knowledge.
human expert. • Shallow knowledge – based on empirical and
heuristic knowledge (may not guaranteed to
• Uncertainty is lack of information to make work).
a decision (chap. 4 & 5).
• Deep p knowledge g – based on basic structure,,
• Algorithmic paradigm is not appropriate function, and behavior of objects.
for problems with uncertainty. • E.g. prescribe aspirin for headache vs. consider
biomedical, physiological and other conditions of
the human body
21 22

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

Problems with Algorithmic Considerations for Building


Solutions Expert Systems
• Conventional computer
p programs
p g generally
g y solve • Can the problem be solved effectively by
problems having algorithmic solutions. conventional programming? (without uncertainty)
• Is there a need and a desire for an expert system?
• Algorithmic languages include C, Java, and C#. • Is there at least one human expert who is willing
to cooperate?
• Can the expert explain the knowledge to the
• Classic AI languages include LISP and k
knowledge
l d engineer
i so that
th t it is
i understandable
d t d bl by b
PROLOG. the knowledge engineer?
• Is the problem-solving knowledge mainly
heuristic and uncertain (not based on logic and
algorithm) ?
27 28

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

Elements of an Expert System Elements of an Expert System

• User interface – mechanism byy which user and • Agenda


g –ap prioritized list of rules created by
y the
system communicate (CUI or GUI). inference engine, whose patterns are satisfied by
• Exploration facility – explains reasoning of facts or objects in working memory.
expert system to user. • Knowledge acquisition facility – automatic way
• Working memory – global database of facts used for the user to enter knowledge in the system
by rules
rules. bypassing
yp g the explicit
p codingg byy knowledge
g
engineer.
• Inference engine – makes inferences by deciding
which rules are satisfied and executes the rule • Knowledge base – containing a list of rules
with highest priority. representing the knowledge.

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

Production Rules General Methods of Inferencing

• 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

• Backward chainingg – reasoningg in reverse from a • Rule-based expert


p systems
y – most ppopular
p type
yp
hypothesis, a potential conclusion to be proved, to today.
the facts that support the hypothesis – best for • Knowledge is represented as multiple rules that
diagnosis problems. specify what should/not be concluded from
– E.g. If someone enters the room with wet shoes and an different situations.
umbrella, you assume it is raining. To prove that, you
need to ask the person if it is raining. If the answer is • Forward chaining – start w/facts and use rules do
yes, your hypothesis is true. draw conclusions/take actions.
– PROLOG performs backward chaining • Backward chaining – start w/hypothesis and look
for rules that allow hypothesis to be proven true.
37 38

Forward/Backward Chaining Post Production System

• Forward chainingg – pprimarily


y data-driven. • First used in symbolic logic by Post.
• Basic idea – Post proved that any mathematical
• Backward chaining – primarily goal driven. or logical system is simply a set of rules
specifying how to change one string of symbols
into another string of symbols.
• Productions rules can represent major classes of
knowledge.
• Basic limitation – lack of control mechanism to
guide the application of the rules, such as which
rule to use if multiple rules may be used.
39 40

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

Markov Algorithm Rete Algorithm


• The following example moves the first letter of • Functions like a net – holding a lot of information
an input string to the end: about the rules in a network in memory.
– (1) αxy → yαx – Dynamic data structure like B+ tree which reorganize
itself to optimize search.
– (2) α → ∧
– (3) ∧ → α Input string: ABC • Much faster response times and rule firings can
occur compared to a large group of IF-THEN
rules which would have to be checked one-by-one
y
in conventional program.
• Takes advantage of temporal redundancy and
structural similarity of the rules.
• Drawback is high memory space requirements.
43 44

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

Imperative Programming Functional Programming


• Statement-oriented programming • Centered around functions – avoid state and
• Developed to free programmers from coding mutable data (e.g. LISP, SQL, XML …).
assembly language in von Neumann architecture. • Combining simple functions to produce more
• Focuses on the concept of modifiable memory – powerful functions – basic idea.
variables and assignments.
• A bottom-up design (opposite from
• During execution, program makes transition from imperative languages.
the initial state to the final state by passing
through series of intermediate states. – Factorial(n) = n*Factorial(n-1)
• Provide for top-down-design. • Designed to be referentially transparent.
• Not efficient for directly implementing expert – Sum = f(x) + x should be equivalent to
systems because of its sequential nature. Sum = x + f(x)
47 48

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

Artificial Neural Systems


Nonprocedural Paradigms
(ANS)
• Expert
p systems
y can be considered declarative • Based on one way the brain processes
languages – programmer does not specify how to information.
achieve a goal at the algorithm level. – A large number of highly interconnected neurons
– E.g. in a rule-based expert system, the order that (processing elements)
the rules were entered does not affect which • Models solutions by training simulated neurons
rules are activated. connected in a network – learning by examples.
• IInduction-based
d ti b d programming i is
i an application
li ti • ANS are found in face recognition, medical
of AI – the program learns by generalizing from diagnosis, games, and speech recognition.
a sample. • Good at solving problems that people can not
– E.g. 2, 4, 6, ? explain how they do it.
51 52

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

Figure 1.10 Neuron


ANS Characteristics
Processing Element
• Neural nets are not programmed in the
conventional sense.
• They are “programmed” by simply
supplying the input and corresponding
output, to train the nets.
• The net learns byy automatically
y adjusting
j g
weigths and thresholds.
• Training may take hours or days. But once
finished, the net responds very quickly.
55 56

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

Summary Continued Review Questions

• 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

You might also like