0824783603 expert
TRANSCRIPT
-
8/13/2019 0824783603 Expert
1/325
title: Expert Systems for Engineers
author: Siddall, James N.
publisher: CRC Press
isbn10 | asin: 0824783603
print isbn13: 9780824783600ebook isbn13: 9780585327761
language: English
subject Computer-aided engineering, Expert systems (Computer science)
publication date: 1990
lcc: TA345.S565 1990eb
ddc: 620/.0042/0285633
subject: Computer-aided engineering, Expert systems (Computer science)
-
8/13/2019 0824783603 Expert
2/325
Page i
Expert Systems for Engineers
James N. Siddall
Faculty of Engineering
McMaster University
Hamilton, Ontario, Canada
-
8/13/2019 0824783603 Expert
3/325
Page ii
brary of Congress Cataloging-in-Publication Data
ddall, James N.
pert systems for engineers / James N. Siddall.
cm.
BN 0-8247-8360-3 (alk. paper)
Computer-aided engineering. 2. Expert systems (Computer
ence) I. Title.
A345.S565 1990
0'.0042'0285633--dc20 89-71509
CIP
is book is printed on acid-free paper.
pyright 1990 by MARCEL DEKKER, INC. All Rights Reserved
ither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including
otocopying, microfilming, and recording, or by any information storage and retrieval system, without permission in writing from the
blisher.
ARCEL DEKKER, INC.
0 Madison Avenue, New York, New York 10016
rrent printing (last digit):9 8 7 6 5 4 3 2 1
INTED IN THE UNITED STATES OF AMERICA
-
8/13/2019 0824783603 Expert
4/325
Page iii
eface
is book is based to a considerable extent on the thesis that engineers can and should write their own expert systems. Special
nowledge engineers" are not required. The software packages that are commercially available for assisting in the writing of expert
tems, commonly called "shells", are unnecessary, and even undesirable. And special languages, such as LISP and PROLOG, that are
dely represented as highly desirable if not essential, are also unnecessary, and also may be even undesirable. Most engineers are at
me with a high level language, such as FORTRAN, BASIC, PASCAL, or C. All of these do an excellent job on codifying expert
tems. Also, the engineer is an expert on the engineering method, as well as being a specialist, or near specialist, in some phase ofgineering. And thirdly, the engineer has an almost unique training and experience in intuitive decision making, which is the whole basis
expert systems. Finally, engineers are highly creative, and can cope well with the creativity requirements of designing expert systems.
is expertise, combined with the rigorous training in logical thinking that all engineers possess, makes them uniquely well qualified to
-
8/13/2019 0824783603 Expert
5/325
Page iv
velop expert systems. And incidently, to use them intelligently.
is book is also an attempt to remove the cloud of mystery that surrounds the subject of expert systems. Although it seems to be
rsed with a compulsion by authors to present it as a highly advanced and arcane subject, it is really rather simple and straightforward.
so many books on artificial intelligence present a broad conceptual picture of the subject, with a tendency to gloss over practical
ails. The emphasis here is on down to earth practical details. The book includes the use of uncertainty methods and Boolean algebra,
ich all engineers may not be familiar with, but useful expert systems can be written even without these. And all of the necessary
roductory theory is included. The subject of data structures is an important basis for creating expert systems, and is the one that
gineers are most likely to be unfamiliar with. Some introductory theory is given in the Appendix, but large systems depend heavily on
a structures, and the designer of such systems may find it necessary to extend his or her knowledge in this field.
pert systems is a very new subject in engineering, and not yet in widespread use; but it has great potential for exploiting the power of
computer in engineering practice. Expertise, until recently only available from live human experts, can now, to a circumscribed
ent, be
-
8/13/2019 0824783603 Expert
6/325
Page v
dely available to technologists at all levels, in many different applications. It is one of the new subjects in engineering that is only
acticable to use when computers are available. Its most important contribution is that it makes possible day-to-day use, by all
gineers, of complex engineering knowledge - knowledge and expertise that otherwise has lain unused, and even often unknown.
e chapters containing the more advanced material are essentially independent of each other. These are Chapter 9, "Expert Systems
orporating Uncertainty"; Chapter 10, "Machine Learning Expert Systems"; and Chapter 11, "Boolean Algebra".
e book contains a number of algorithms in pseudo code that should provide a convenient basis for preparing software in the language
the reader's choice. However, no claim is made that they are optimum, and suggestions to the author for improving them would be
lcomed.
JAMES N. SIDDALL
-
8/13/2019 0824783603 Expert
7/325
Page vii
ontents
ntroduction to Applied Artificial Intelligence 1
1.1 Introduction 3
1.2 Languages in Artificial Intelligence 12
1.3 Using Artificial Intelligence in Engineering 17
1.4 Applications of Expert Systems 26
Introduction to Expert Systems 35
The General Structure of Expert Systems 41
Phases of Developing an Expert System 55
Knowledge Base 63
5.1 Introduction 65
5.2 Acquiring the Rules 66
Inputs, Intermediate Conclusions, and Outputs 91
6.1 Introduction 93
6.2 Inputs 93
6.3 Outputs 94
6.4 Intermediate Conclusions 95
-
8/13/2019 0824783603 Expert
8/325
Page viii
Control Structures 97
7.1 Introduction 99
7.2 Sequential Structure with Iteration 101
7.3 Exhaustive Search 101
7.4 Forward and Backward Chaining 105
7.5 Structuring 106
7.6 Pruning 107
7.7 Decomposition 108
7.8 Heuristic Search 109
7.9 Use of the User's Judgement 110
7.10 General Production Systems 110
7.11 Hard Wired Systems and Parallel Processing 112
7.12 Selection of a Control Structure 113
Data Structures 119
8.1 Data Structured Control 121
8.2 Frames 130
8.3 Blackboards 136
8.4 Interfacing with Commercial Data Management Software 137
Expert Systems Incorporating Uncertainty 141
9.1 Introduction 143
9.2 Probability Concepts 145
9.3 Use of Subjective Probability and Probability Laws in Expert
Systems155
9.4 Monte Carlo Simulation 164
-
8/13/2019 0824783603 Expert
9/325
Page ix
9.5 Bayes' Theorem in Expert Systems 168
9.6 MYCIN Method 175
9.7 Control Structures with Uncertainty 178
9.8 Discussion 181
Machine Learning Expert Systems 187
10.1 Introduction 189
10.2 The Precedent Rule Method 190
10.3 Generation of Rules Using Entropy 195
10.4 Multiple Valued Attributes 212
10.5 Example 213
10.6 Discussion 216
Boolean Algebra 221
11.1 Introduction 223
11.2 Definitions and Postulates 225
11.3 Manipulation of Boolean Functions 230
11.4 Simplification of Boolean Functions 235
11.5 Multiple Functions 250
11.6 Conversion of Expert Systems to Boolean Form 252
11.7 Uncertainty with Boolean Representation 261
Design Systems 267
12.1 The Use of Expert Systems in Design 269
12.2 The Special Nature of Design Systems 269
12.3 Some Typical Rules for the Bearing System 276
12.4 An Extension of the Bearing Example 285
12.5 Using Frames with the Bearing Selection System 295
-
8/13/2019 0824783603 Expert
10/325
Page x
Expert System Development 297
13.1 Small Systems 299
13.2 Developing Larger Systems 301
13.3 Testing and Updating 311
pendix - Data Structures 313
A.1 Stacks and Queues 315
A.2 List Processing 320
A.3 Search Methods 324
A.4 Sorting 327
dex 333
-
8/13/2019 0824783603 Expert
11/325
Page 1
troduction to Applied Artificial Intelligence
-
8/13/2019 0824783603 Expert
12/325
Page 3
roduction
e purpose of this chapter is to provide a general overview of applied artificial intelligence, of which expert systems is only one topic,
hough the most widely used. It is difficult to get a general insight into the subject.
investigating the subject of artificial intelligence, one soon learns that it is many things to many people. It also has a somewhat
ferent meaning as a fundamental research subject than as an applied research subject, or as an applied technological method. For
mputer scientists in fundamental research, it appears to represent an attempt to set up algorithmic principles for simulating thinking
ocesses of the brain, to develop some sort of general problem solving or human-like intellectual behaviour. In neural sciences it is thedy of the neural brain processes, with a view to copying them or simulating them in hardware. Philosophers are also interested in
ificial intelligence, in the hope of gaining a better insight into the nature of human thought (Boden 1977, McCorduck 1979).
ychologists are concerned with similar goals. It seems to be generally conceded that not too much progress has been made in
ndamental research into artificial intelligence over the past 20 to 30 years that it has existed as a science. This is not to suggest that it
ould be abandoned as a worthwhile research subject. The goals are of vital importance. On the other hand, rather
-
8/13/2019 0824783603 Expert
13/325
Page 4
ong claims are now being made for the progress and utility of applied research in artificial intelligence, primarily by computer
entists in the field. Their goals, and the nature of their research, appear to be more modest than those in pure research. They are
veloping algorithms and programs that they believe represent in some sense, specific, rather than general, human thinking processes.
gineers have invaded the field of applied research, as they do in any field when they find that, in their particular application, not
fficient is known to proceed directly to the desired result. It may be simply a minor adaptation of existing theory, or it may be a major
earch program.
s extremely difficult to set bounds on the area of artificial intelligence. After all, almost anything a computer does for us simulates
man thinking processes. It surely takes intelligence to do complex numerical calculations, or complex sorting of data. Computer
entists tend to define artificial intelligence by what it has done, rather than by any clear-cut principles or concepts. The usual areas ofplication that are cited are as follows (Nillson 1980, Hayes-Roth et al 1983, Winston and Brown 1979, Winston 1977, Charniak and
cDermott 1985, Schutzer 1987).
erpretation of Natural Language
mputer systems have been developed that, in a limited way, interpret the
-
8/13/2019 0824783603 Expert
14/325
Page 5
aning of natural language, either for translation to another language, or to provide instructions for a computer or control process.
pert Systems
ese have been called automatic consulting systems, because they simulate the role of an expert in solving some problem, using an
ormation database provided by a real expert, plus rules for interpreting the data in terms of a particular problem that is within the
ope of the package. It is this application of artificial intelligence that appears to have the most promise for the partial automation of the
sign process, and the solving of other engineering problems requiring expertise, such as fault diagnosis. It also seems to have had the
st practical success of any applications of artificial intelligence, and has great promise as a tool in engineering work of all kinds.
eorem Proving and Mathematical Analysis
mputers can be programmed to apply logic rules automatically to check the validity of a mathematical theorem, and software has
en developed to do analytical integration of complex algebraic expressions.
ntrol of Robots
is appears to imply more than just programming the motion of the robot's linkages; and seems to require the inclusion of software for
nning the motions of the robot, and perhaps requiring the control software to make dynamic decisions while the robot is working. A
ntrol engineer might have some difficulty un-
-
8/13/2019 0824783603 Expert
15/325
Page 6
rstanding how this is different from conventional process control by computers, other than the fact that the linkage somewhat
embles human morphology.
rception or Pattern Recognition
is topic is sometimes called machine vision. Video hardware is used to feed data to a computer in the form of pixel brightness levels
colors. Pixels are micro-sized photocells, arranged in an array at the camera's focal plane, and thus replacing conventional film in a
mera. This gives the computer image data that can be processed, and it can be programmed to interpret the data in a way that
rresponds to some extent to the way humans interpret visual input. This could be a simple outline of a part which is analyzed to
curately determine if it matches a prescribed outline within tolerances; or it could be a system that analyzes a jumble of unoriented
rts and directs a robot to orient its hand correctly so as to pick up one of the parts. Or, on an even more complex level, it may be a
tem that examines a scene, and selects from the pattern an identifying classification from its reference database, such as an obstacle
an autonomous vehicle, controlled by artificial intelligence. An artificial intelligence specialist might be unhappy about calling the first
ample artificial intelligence, but it is difficult to see any conceptual difference between the examples.
mbinatorial Examples
is category includes games and puzzles. Chess and checker playing computers have
-
8/13/2019 0824783603 Expert
16/325
Page 7
ched quite a high level of expertise (McCorduck 1979, Fleck and Silverman 1984). It also includes assignment problems (Nillson
80) such as the travelling salesman problem in which it is desired to minimize the travel path of a salesman who has to visit a
ecified set of cities, in any order. This topic seems to have a great deal in common with the mathematical topic of combinatorial
imization (Lawler 1976) or integer programming (Greenberg 1971), which certainly requires use of the computer. However there is
le cross reference between them, and the difference seems to be in the terminology used, or even the computer language used.
tomatic Programming
mited success has been achieved in translating natural language algorithms into high level computer languages. Computer program
sign languages, or pseudo codes (Horowitz and Sahni 1976 and Van Tassel 1978), are a formalized form of describing an algorithm,
d, if in sufficient detail, can almost directly be translated into a high level language. However, workers in artificial intelligence seem to
ve in mind a more interactive approach, where the user presents to the computer a rather brief or vague statement of the algorithm,
d the computer worms out of him or her more details of what is really required.
achine Learning
this topic the computer learns from a set of examples the appropriate way to make decisions, in a limited problem region (Charniak
d McDermott
-
8/13/2019 0824783603 Expert
17/325
Page 8
85). Some expert systems have successfully used machine learning, for example Wu and Siddall(1988).
ese classifications of the types of things that applied artificial intelligence workers are doing, or hope to do, gives some insight into
at it is and what it might do for engineering. However one would like to have available some general principles of how artificial
elligence is used. Unfortunately this does not seem to be available, as confirmed by the following quotation from Hayes-Roth et al
983), page 6.
These and other accomplishments indicate that the field of expert systems is maturing rapidly. The scientific and technical bases that support this field,
however, have achieved only limited development. Each new application requires creative and challenging work, although some principles and
systematizations heve emerged. At this point expert systems is a highly experimental field with little in the way of general theory. Nevertheless, core
problems have surfaced and numerous tools and techniques now exist that transfer from one application to the next.
e authors were discussing expert systems, rather than artificial intelligence generally, but the statement would seem to be rather
nerally applicable, and still currently true.
reviewing all of the above, an experienced application software developer might have some difficulty in discerning how artificial
elligence is different from
-
8/13/2019 0824783603 Expert
18/325
Page 9
er applications work. Certainly the examples illustrate great ingenuity in software design, but this is richly demonstrated in many
er kinds of application software. And the fact that programs in artificial intelligence sometimes do better than humans is not an
usual achievement for computers. It is also somewhat difficult to accept that programs in artificial intelligence are more ''intelligent"
n other kinds of applications. It would seem desirable not to be too concerned with the name "artificial intelligence", which was
her an unfortunate choice. Intelligence is extremely difficult to define, and the term conjures up much more than it should for real
e, practical, and current problems. There are, however, special criteria that distinguish the field, and it is important to identify them, so
t for a given problem type, in our case design automation and other engineering applications, we can decide if the methods of
ficial intelligence are applicable.
st, artificial intelligence applications work mainly with symbols rather than numbers. This is not a sufficient condition to distinguishm; data management systems certainly work a great deal with symbols. A data file containing mailing lists, for example, can be
nipulated in all kinds of elegant ways. However it is an important characteristic and has influenced the kinds of languages used for
ificial intelligence. Symbols are used to represent knowledge, and Hayes-Roth (1983) has
-
8/13/2019 0824783603 Expert
19/325
Page 10
phasized that expert systems use knowledge more than formal reasoning methods. And he really means expert knowledge; and this
ludes not only knowledge that can be found in books, but also privileged knowledge known only to highly trained and experienced
perts in a field. Such knowledge is primarily intuitive. In a given situation an expert makes an intuitive decision based on judgement
d experience and the context of the problem, and the decision has a high probability of being correct. Engineering offices are full of
pert designers whose expertise is often lost when they leave or retire. Computerized expert systems should be a gold mine in this field.
ese expert designers cannot enumerate all of the knowledge upon which a decision is based; much of it is buried in the unconscious
nd. A central problem of expert systems would seem to be how to utilize such unconscious knowledge.
e of the difficulties in coming to grips with the literature of artificial intelligence (AI), and in particular expert systems, is the
minology, which tends to be unnecessarily arcane. Hayes-Roth goes on to say on page 5,
In contrast to traditional data processing systems, AI applications generally involve several distinguishing features, which include symbolic representation,
symbolic inference, and heuristic search. In fact, each of these corresponds to a well studied core topic within AI, and a simple AI task often yields to one
of the formal approaches developed for these core problems.
-
8/13/2019 0824783603 Expert
20/325
Page 11
ese topics are not unfamiliar to many engineers, but perhaps not by the same names. Symbolic representation simply means
resenting things or procedures by symbolic names, usually natural language ones. Symbolic inference is the IF-THEN algorithmic
ucture, widely used in procedural high level languages such as FORTRAN, BASIC, PASCAL and C. Simple examples are
a gear (must be compact AND have long life AND be
silent) THEN
Use a case-hardened alloy steel
(the process temperature exceeds 1000 degreesAND the temperature is increasing at a rate greater
than 10 degrees per sec) THEN
Shut down the process
me authors also call this abduction.
mbolic inference also includes what is sometimes called predicate calculus by artificial intelligence writers. It is essentially the same as
olean event logic1, used in combinatorial mathematics, probability theory, digital circuit analysis, and fault trees in reliability theory.
e only difference is in the terminology and notation, where the list structure of the language LISP is used, as in the following
amples.
(NOT (AND A B)) (OR C D)
1For detailed information on Boolean algebra, see Chapter 11.
-
8/13/2019 0824783603 Expert
21/325
Page 12
e term predicate, appears to be simply an event, or a fact, or a characteristic, that can either be true or false. Thus in LISP notation,
fact that the component x is a gear could be represented by the predicate
EAR X)
uristic search is a well known procedure in optimization, widely used in engineering, management science, military science, and other
lds. It is decribed in detail in Chapter 7.
nguages in Artificial Intelligence
e most commonly used languages in artificial intelligence are LISP and PROLOG. LISP is the major contender, and special
mputer systems of hardware and software have been marketed for using LISP in software development in artificial intelligence
plications.
SP is one of the oldest high level languages, having been created in 1960 (Wegner 1976).
general LISP does not evaluate expressions as a sequence of assignment statements, such as the following pattern.
x, a, and b have known values in the computer memory
y = ax + b
-
8/13/2019 0824783603 Expert
22/325
Page 13
z = y2+ sin(y)
output z
tead the computer is presented with a function, which it evaluates, and then prints out the result, in the following pattern.
x, a, and b have known values in the computer memory
(f2(f1x a b))
ere x, a, and b are arguments of an operator or function f1, as defined in the following example.
f1= (PLUS (TIMES a x) b)
d f1, is an argument of a function f2defined by
f2= (PLUS (EXPT f12) (SIN f1))
te that the function name precedes the arguments, each is separated by a space, and the whole is surrounded by parentheses. The
ccessive evaluations are built up by nesting, rather than by sequential statements. Note also that the trigonometric and arithmetic
erators work in the same manner as nested functions.
most applications of LISP, algebraic type expressions like the above are not too commonly used, and the
-
8/13/2019 0824783603 Expert
23/325
Page 14
nctions are mostly operators that manipulate symbols. Symbols are used to represent not only physical quantities that have a
merical value, but also physical things and concepts. The following is a simple example.
ETQ TOOLS (LIST 'HAMMER 'SCREWDRIVER 'SAW 'WRENCH 'AWL
LE)
OLOG, or extensions of it, is the language of choice of the Japanese in their Fifth Generation project (Feigenbaum and McCorduck
83). It is more widely used in Britain and Europe, but seems to be gaining popularity in North America. It is really a higher level
guage than the others referred to here, since it is specially designed for logic expressions (IF/THEN), and contains a special
ocedure for solving systems of logic expressions.
RTH has been used for at least one expert system (Johnson and Bonissone 1983). And PASCAL and C are gaining popularity.
wever the overwhelming leader is LISP, and for many workers LISP and the applied subject of artificial intelligence are very closely
erwoven; indeed they sometimes seem almost synonymous; if you are programming in LISP you are applying artificial intelligence,
d vice versa. The language of LISP was created for artificial intelligence work (Wegner 1976). Thus one is inclined to the impression,
not to the conviction, that applied artificial intelligence is simply software created using a
-
8/13/2019 0824783603 Expert
24/325
Page 15
mbolic language such as LISP, and no other criteria are needed to define it.
ese languages are symbolically oriented, in that they are said to be designed particularly to work with word symbols rather than
merical calculations and analytical algorithms. This is quoted as a basis for using them as languages of preference in artificial
elligence work. This is somewhat puzzling since procedural languages have been overwhelmingly used in data management software,
ich is surely symbolically oriented.
other language feature said to be of vital importance in artificial intelligence work is recursion. It permits a function to call itself, and
a feature of LISP, as in the following example.
Y = FUNC(A, FUNC(E, F, G), B)
cursion is also a standard procedure in PASCAL. Wagner (1982) shows that, although recursion is not a legal feature of FORTRAN
it can be done quite easily by indirect means.
third feature of LISP that is commonly quoted as important is the facility for dynamic memory allocation, by which memory space
n be allocated automatically by the computer as required, rather than in advance by DIMENSION type statements. ALGOL 60, APL
d PASCAL have it, and other languages such as FORTRAN 77 can incorporate it by
-
8/13/2019 0824783603 Expert
25/325
Page 16
luding data management in the coding, using linked lists (Horowitz and Sahni 1976).
languages are being evolved these distinctions appear to be disappearing. It has been proposed, for example, that the next version of
ndard FORTRAN will have recursion and dynamic memory allocation.
s the author's belief that there are no important reasons for not using any high level language in artificial intelligence work, and the
ocedural languages can easily duplicate the coding of LISP or PROLOG. The coding may not be as elegant, or as compact, or as
icient. This does not seem to have been demonstrated as necessarily true, but in any event these may not be primary concerns. Other
nsiderations may be of equal or more importance - such as portability, running time, convenience of access, ease of reading, ease of
intaining and updating, flexibility, interfacing with other languages, familiarity of the programmer with the language, and time to code.
r example, procedural languages using recursion are said to have a longer running time than alternate procedures, and are more
ficult to debug.
e more widespread use of artificial intelligence applications in engineering may in fact be encouraged if this tight bond with special
guages is broken, and engineers realize that artificial intelligence applications are just another type of algorithm, for which the more
miliar general purpose languages can quite well be used.
-
8/13/2019 0824783603 Expert
26/325
Page 17
ing Artificial Intelligence in Engineering
.1
eas of Application
r particular concern is the application of artificial intelligence methods in engineering. They are confined, in commercial applications,
inly to two topics - machine vision and expert systems. Engineers do have a strong research interest in using interpretation of natural
guage for communication with factory processes and robots, the control of robots and other autonomous systems, and machine
rning. All of these are closely related to expert systems.
.2
pert Systems
e cannot really get a conceptual grasp of expert systems until later chapters, but it will be helpful at this point to give the definition of
British Computer Society.
"An expert system is regarded as the embodiment within a computer of a knowledge-based component from an expert skill in such a form that the system
can offer intelligent advice or take an intelligent decision about a processing function. A desirable additional characteristic, which many would consider
fundamental, is the capability of the system, on demand, to justify its own line of reasoning in a manner directly intelligible to the enquirer. The style adopted
to attain these characteristics is rule based programming."
-
8/13/2019 0824783603 Expert
27/325
Page 18
le based programming simply means the use of IF/THEN algorithmic structures to codify the decision rules from the expert.
gineering use of expert systems is becoming fairly widespread, although many reported on are at the research stage. The engineer is
entially a generalist, and could be greatly assisted by expertise in several engineering specialties. Expert systems could also be
ovided to non-professionals working in technology. We can categorize the following different areas of expertise.
nthesis
s synthesis that is the engineering designer's unique contribution to the art of engineering. He or she learns the laws of nature and
ocedures of analysis from the physicist, the chemist, the biologist, and the mathematician. Synthesis, the art of putting together a newchine, structure, chemical process, electrical circuit, or system, is a special talent of the engineer, and the basis of our industrial
ilization. Duplicating this process in an expert system is far beyond our present knowledge of human thinking, both conscious and
conscious, however some work has been done on low level engineering synthesis.
gineering Modeling
e should not imply, however, that the engineer does not make, as well, an important contribution to analysis - the verification of the
sign. Analysis is an essential component of design. It ensures that the design is feasible; that is, it will meet the per-
-
8/13/2019 0824783603 Expert
28/325
Page 19
mance requirements expected of it. But even more importantly, analysis may be used to ensure that the design is feasible in an
imum way. Let us examine the analytical method. To make an analysis, we must first substitute for the physical problem a simplified
d idealized abstraction that is commonly called the engineering model, a prototype or archetype of the design. The problem is not
erwise subject to analysis - we cannot analyze the highly complex real life device. We can only hope that the engineering model will
resent the real device or system in all of its essential features. An important part of this model building is deciding what failure modes
likely to be significant, and should be included in the model for predicting feasibility. Will a roof beam fail from excessive yielding of
material, or collapse by buckling, or shearing of the end fasteners? What level of snow loading should be applied? Will a highway
ry enough vehicles, have an adequate life, be safe, convenient, not require excessive maintenance, and permit snow removal under
reme conditions? Will an aircraft design have adequate life, reliability, capacity, controllability, and so on? Will a transmission line
ry the required current; or will an electrical motor provide the required power? It requires engineering skill, experience, intuition anddgement to set up models for such predictions. The mathematicians and scientists cannot do it for the engineer. Modeling uncertainty
a major element of deci-
-
8/13/2019 0824783603 Expert
29/325
-
8/13/2019 0824783603 Expert
30/325
Page 21
ecial skills in diagnostic procedures and use of sensors.
plications
engineer can hope to be successful unless he is an expert on the field of application of the device or system being designed. If an
ricultural mowing machine for hay making is being designed, the designer must be an expert on the mowing of hay.
ols
e engineer must be trained to use the tools of the trade. These include drawing, both manual and computerized, the use of calculators
d computers, and a familiarity with procedures for finding information.
timization Criteria
d finally, and perhaps most important of all, the designer must be an expert on the criteria for choosing the best possible design.
gineering designers tend to work with what might be called immediate criteria, which are the performance criteria that they wish to
ximize or minimize - minimum weight for an aircraft, minimum cost of a lathe, maximum capacity of a railway car, and so on.
metimes these can be achieved by analytical optimization, but more often by judgement. But the real objectives for a design are more
stract, and because they are abstract, we tend to satisfy them indirectly by combining judgement with the immediate criteria. These
ectives may not have an obvious connection to the technological device, but they cannot be ignored. The owner of a motorcycle
y really be more interested in deriving excitement, status, and pleasure from technological devices, rather than just using it as ansportation
-
8/13/2019 0824783603 Expert
31/325
Page 22
nvenience. Examples of human values, and their application to engineering, can be found in Siddall (1982).
er and above these categories of expertise, there is a kind of super expertise permeating all of engineering work, and the engineer,
rticularly the engineering designer, is also the primary expert in these. One aspect of it is aesthetics. The sense of judgement of the
thetics of an engineering design would seem to be the basis for judging the overall optimization of a device, and not just the external
pearance or style. Styling is used to satisfy certain particular values, such as the type mentioned above for motorcycles. Closely
ated to this is the human-machine interaction, commonly called ergonomics. It is apppropriate at this point to bring into the discussion
role of the other groups of technological designers - the architects and industrial designers. These designers tend to have a greater
ntribution to make in ergonomics, and the art of satisfying subtle human values by an appropriate general arrangement and externalpearance.
e second type of super expertise is in risk judgment. This is perhaps the most critical and difficult expertise required. We are referring
the risk levels associated with failure of a device to meet one or more performence requirements. Not only must the engineer make
dgements about the level of risk that is acceptable, but
-
8/13/2019 0824783603 Expert
32/325
Page 23
or she must also make subjective judgments about probability distributions associated with design parameters, so that the actual risk
els are equal to or better than the required risk levels. In the current state of the art, risk judgments are most often coded in simple
tors of safety, but the computer has made practical a codification in terms of probabilities, based on the explicit use of probability
tributions and probabilistic analysis. This topic is discussed in more detail in Siddall (1983).
r next concern is the mechanism for exercising expertise in engineering. Expert systems use expert knowledge, some of which has an
oteric character that is beyond what is available in the literature. Humans are very limited as to how much formal knowledge they can
d in the conscious mind, and formulate at will as a basis for decision making. This is even more true of knowledge acquired by
perience. A specialist with a large background in formal knowledge is usually an expert at following information trails back to
owledge that he or she wants to reformulate. And therefore he can relatively quickly recapture knowledge needed for specificplications, particularly if assisted by computerized information retrieval systems. However most expert decision making is based on
owledge, either from formal learning or experience, that lies in the unconscious mind, and cannot be resummoned. This is the use of
uitive judgement.
-
8/13/2019 0824783603 Expert
33/325
Page 24
specific cases of intuitive judgment, related to expertise in synthesis, the designer might be asked questions like the following.
Why did you use ductile iron rather than steel for that part?
Ductile iron is cheaper than steel for a part that must be cast, and it has excellent ductility for this service. Also it it has worked well
previous similar applications.
Why did you not heat treat that steel to give a yield strength of 250,000 psi (172 MPa) instead of only 125,000 psi (86.2 MPa)?
I would like to have had the high yield strength that is possible with that steel, but the ductility, impact strength, and resistance to
ck growth are too low at that hardness. So I had to sacrifice yield strength to achieve them. The exact trade-off level that I chose issed on my experience in this application - it is intuitive judgement.
Why did you use three bearings instead of two, in order to support that shaft in your gear box?
We have found in this kind of application that only two bearings results in excessive shaft deflection with corresponding misalignment
the gear teeth, and excessive wear and noise.
Why did you select 300 rev/min as the speed for the cutting element in that hay processing machine?
I cannot give you any explicit reasons. I just ''feel" that 300 rev/min will work satisfactorily.
-
8/13/2019 0824783603 Expert
34/325
Page 25
emains to be seen if this is confirmed by field tests, but we have to start somewhere.
hile all of the above kinds of expertise represent potential applications of expert systems, it will become clear, after we examine in
re detail the nature of expert systems, that the highly intuitive and creative kinds of expertise are unlikely candidates for expert
tems. This would particularly include synthesis, engineering modeling, aesthetic judgement, and risk judgement.
.3
achine Vision
e can be briefer and more specific in examining engineering application of machine vision. Some applications are well established
mmercially and militarily. These include image enhancement and inspection. The former process can be used to remove distortion,urring, graininess, and to detect edges of features in the image. Inspection has become an important representative of computerized
omation of production processes; and can inspect the dimensions of components accurately and at high speed. Another application in
omated production is seam following for welding processes.
age detection is beginning to be used with robots for identifying components and their orientation, when robots are picking up parts
d installing them onto fixtures, or assembling them.
ore esoteric applications are at the research level;
-
8/13/2019 0824783603 Expert
35/325
Page 26
ch as image identification and feature extraction for autonomous robots and vehicles.
plications of Expert Systems
flood of engineering applications is appearing in the literature, and it can be difficult to determine if individual ones are really
nificant. As in any "hot" new topic, there is a considerable bandwagon effect. The following gives an indication of the scope of
plications; and is not intended to be comprehensive. The systems may also be proprietary. The source is The CRI Directory of
pert Systems (Smart and Langeland-Knudsen 1986). The status shown is that most recently reported, and may not be up to date.
DESCRIPTION STATUS
intenance of telephone cables, and fault-finding for defective cables Operational
design system for digital circuit designBeing
developed
tomatic forging designBeing
developed
sign of chemical engineering process flow sheets to solve a chemical processing
blemOperational
ble continued on next page)
-
8/13/2019 0824783603 Expert
36/325
Page 27
ble continued from previous page)
DESCRIPTION STATUS
ntrol strategies for channel routing for VLSI micro-circuit chips. Operational
proving agricultural productivity in crop pest control, plant disease treatment, and
nagement recommendations
Pilot system
operational
gnosis of faulty modules in large electronic systems Being developed
ntrol of aircraft moving through an air traffic control center Being developed
chitectural design assistant for house design Operational
sign fixtures for holding and positioning a workpiece for machining Operational
nvert camera image of a drawing into a CAD fileCommercially
available
sist in use of a CAD system for design of digital logic circuits Operational
gnosis and repair of diesel electric engines Operational
intenance of telephone switching systems In field use
erpretation of data concerning soil layers in geotechnical engineeringPrototype
developed
nsultant for operators of nuclear Prototype
ble continued on next page)
-
8/13/2019 0824783603 Expert
37/325
Page 28
ble continued from previous page)
DESCRIPTION STATUS
wer plants developed
p design assistant Under development
erprets logs from dipmeter probes to determine geologic formations for oil
loration
Commercially
available
gnoses problems in turbofan aircraft engines Being developed
ght status monitor to oversee and control aircraft system monitoring and
m functionsBeing developed
tection of early stages of failure in large power distribution transformers Operational
s in preliminary structural design of high rise buildings Being developed
gnoses faults in steel rolling mill In use
alyses models of machines to understand their function Operational
signs single-board computers automatically from high level prescriptions Operational
ects analysis strategy to use in a structural-mechanical system design Operational
s in the design of ocean harbour wave protection jetties Being developed
ble continued on next page)
-
8/13/2019 0824783603 Expert
38/325
Page 29
ble continued from previous page)
DESCRIPTION STATUS
sesses damage of existing structures after an earthquake Preliminary prototype
nfigures DEC VAX minicomputers In use by DEC
number of civil engineering expert systems are decribed in Maher (1987); and engineering design systems in Rychener (1988).
nclusions
cause of the newness of applied artificial intelligence, and the sometimes exaggerated claims for it, it is a worthwhile exercise to
empt to decide if the subject, particularly expert systems, can usefully be applied in engineering.
s difficult not to read too much into the term artificial intelligence, and therefore difficult not to be disappointed when less than
pected is forthcoming. Some writers deliberately exploit these expectations and mask their writings in arcane terminology and phrases
that they seem to deliver more than they do. It seems to be a more severe disease in this field than in most others in science.
orkers in the field tend to follow more the speculative approach of the social sciences and philosophy, rather than the physical and life
ences. It makes the research literature particularly difficult to penetrate. However many writers do use the term artificial in-
-
8/13/2019 0824783603 Expert
39/325
Page 30
igence openly and honestly; they do not intend it to mean more than a modicum of intelligence, and do not pretend more, either in
tings or in applications.
r purpose here is not to evaluate artificial intelligence as such, although it is difficult to avoid this as a side issue. The work of people
the field of artificial intelligence is a valuable contribution to software engineering. They are applying well known techniques (which
y tend not to acknowledge) in somewhat new ways, with new jargon and terminology; but they are developing new and important
plications of computers. However one must view with caution any claim that they are making an important and unique contribution to
understanding of human intelligence, or the development of real artificial intelligence. They are doing no more than anyone else who
writing real and original algorithms. All computer work can be considered a contribution to artificial intelligence. In some areas
mputer intelligence is already far beyond that of humans, and as the field develops we shall gradually evolve a computing capacityt slowly approaches human intelligence in those areas where it does not.
e can conclude that engineers can learn much from the experience of workers in this field on how to build expert or consulting
tems in engineering; and that such systems would be a very valuable aid to engineering, both in design and in operations. It is the
hor's strong belief that
-
8/13/2019 0824783603 Expert
40/325
Page 31
gineers should be the ones to write these programs, with the assistance of specialists in the field of expertise. Engineers know best
actly what is needed in a consulting system; and have sufficient familiarity with the field, and with software development, to create
most effective systems in the shortest possible time. Expert systems notoriously require a very large number of man-hours.
ferences
den, M. (1977). Artificial Intelligence and Natural Man, Basic Books, N.Y.
arniak, E. and McDermott, D. (1985). Introduction to Artificial Intelligence, Addison-Wesley, Reading, Mass.
igenbaum, E. A. and McCorduck P . (1983). The Fifth Generation, Addison-Wesley, Reading, Mass.
eck, E. and Silverman, J. (1984). SPOC: the Chess Master, BYTE, Vol. 9, No. 3, March, pp. 288294.
eenberg, H. (1971). Integer Programming, Academic Press, N. Y.
yes-Roth, F., Waterman, D. and Lenat, D. (1983). Building
-
8/13/2019 0824783603 Expert
41/325
Page 32
Expert Systems, Addison-Wesley, Reading, Mass.
rowitz, E. and Sahni, S. (1976). Fundamentals of Data Structures, Computer Science Press, 11 Taft Court, Rockville, MA 20850.
hnson, H. E. and Bonissone, P. P . (1983). Expert System for Diesel Electric Locomotive Repair, Jour. of FORTH Applications and
search, Vol 1, Sept., pp. 716.
wler, E. L. (1976). Combinatorial Optimizations: Networks and Matroids, Holt, Rinehart and Winston, New York.
aher, M.L. (1987). Expert Systems for Engineers; Technology and Applications, American Society of Civil Engineers, New York.
cCorduck, P. (1979). Machines Who Think, W. H. Freeman, N.Y.
llson, N. J. (1980). Principles of Artificial Intelligence, Tiogo Publishing Co., P.O. Box 98, Palo Alto, CA 94032.
chener, M. D. (ed.) (1988). Expert Systems for Engineering Design, Academic, San Diego, California, USA.
-
8/13/2019 0824783603 Expert
42/325
Page 33
hutzer, D. (1987). Artificial Intelligence; an Applications Oriented Approach, Van Nostrand Reinhold, N.Y.
ddall, J. N. (1982). Optimal Engineering Design; Principles and Applications, Marcel Dekker, N.Y.
ddall, J. N. (1983). Probabilistic Engineering Design; Principles and Applications, Marcel Dekker, N.Y.
mart, G. and Langeland-Knudson, J. (1986). The CRI Directory of Expert Systems, Learned Information (Europe) Ltd., Oxford.
n Tassel, D. (1974). Program Style, Design, Efficiency, Debugging and Testing, Prentice-Hall, Englewood Cliffs, N.J.
agner, J. L. (1980). FORTRAN77: Principles of Programming, Wiley, N.Y.
egner, P. (1976). Programming Languages - the First 25 Years, IEEE Trans. on Computers, Dec., pp. 12071225.
nston, P. H. (1977). Artificial Intelligence, AddisonWesley, Reading, Mass.
-
8/13/2019 0824783603 Expert
43/325
Page 34
nston, P. H. and Brown, R. H. (eds.) (1979). Artificial Intelligence; an MIT Perspective. Vol. 1: Expert Problem Solving, Natural
nguage Understanding, Intelligent Computer Coaches, Representation and Learning, MIT Press, Cambridge, Mass.
u, Z. and Siddall, J. N. (1988). A Model for Intuitive Reasoning in Expert Systems, Computers in Engineering 1988, Proceedings of
ME International Computers in Engineering Conference, San Francisco, pp. 459466.
-
8/13/2019 0824783603 Expert
44/325
Page 35
troduction to Expert Systems
-
8/13/2019 0824783603 Expert
45/325
Page 37
expert system is an algorithm for making automatic decisions, or predictions, related to some specific problem area, requiring special
pertise. We wish to be able to decide on problems such as
What will the weather be like tomorrow, given weather data for the previous week?
What material should we use for a given application?
What are the reasons why a particular device will not work correctly, given the error features?
Will this heat exchanger transfer a specified amount of heat, given its dimensions, fluid flows, and material properties?
What disease does a patient have, given a set of symptoms?
e first question that an engineer will ask is how this differs from conventional engineering modeling. We are all familiar with many
mputer packages that do such things, using abstract models and physical laws. And in fact, the fourth item above is done that way.
d yet it would not appear to be intrinsically different from the others. The reasons that computer programs for the others are
mmonly called expert systems, would appear to be the following.
Physical modeling is not possible, and intuitive relationships are used for the predictions, provided by an expert in the field.
-
8/13/2019 0824783603 Expert
46/325
Page 38
There are a large number of inputs or variables that enter into the prediction.
The relationships between the outputs and inputs, or in other terminology, between the dependent and independent variables, are all
the form of IF/THEN logic rules.
hy, then, do so many writers consider the first three and the fifth examples to be manifestations of human intelligence, or a simulation
some sense of human intelligence, while the fourth item is not? There would seem to be no valid reason. Efforts in the literature to
intain the illusion that expert systems are somehow ''more intelligent" are becoming rather extreme. Authors are now talking about
hallow" versus "deep" reasoning expert systems. It is sometimes difficult to penetrate the jargon, but they essentially seem to mean
t shallow systems are the type that have conventionally been developed up until recently, using heuristic and intuitive relationships as
asis for the IF/THEN rules that provide the modeling, while the more advanced systems, the deep systems, include the physical
deling so familiar to engineers. Even the commonly used term, knowledge based systems, is rather pretentious, and implies much
re than it should. All engineering modeling is knowledge based.
wever we must not let concern about terminology, or about exaggeration by workers in the field, imply that developments in expert
tems are not significant and of
-
8/13/2019 0824783603 Expert
47/325
Page 39
tential value to engineers. It is a different kind of modeling than we customarily use, and has its own special methods. If we must call
s kind of modeling "expert systems", or "artificial intelligence", so be it; as long as we do not deceive ourselves about its real nature.
pert systems were really the first successful application of artificial intelligence; and the first system was developed in the area of
dical diagnosis over ten years ago. Despite a great deal of activity and public discussion in the field, relatively few systems appear to
yet openly used in practice. It is likely that a large unknown number are secret proprietary systems within companies. A number of
called shells are commercially available, some for microcomputers. These are software packages that can be used to build expert
tems; their purpose being to save the programmer a significant amount of the considerable programming time required for the
velopment of useful systems. They are also called expert system tools. There are a considerable number of commercial shells
ailable; and the companies providing them claim that they have had many applications. A more complete discussion of shells can beund in Harmon, Maus and Morrissey (1988).
arge percentage of the development of an expert system is devoted to the user interface.
e have suggested that there are three criteria for distinguishing expert systems from conventional engineering modeling. The first
terion was that physical modeling
-
8/13/2019 0824783603 Expert
48/325
-
8/13/2019 0824783603 Expert
49/325
Page 41
he General Structure of Expert Systems
-
8/13/2019 0824783603 Expert
50/325
Page 43
pert systems are primarily a kind of intuitive modeling, although it is quite possible to incorporate empirical or physical modeling at
y stage.
intuitive modeling a human expert sets up a set of IF/THEN rules that can be used for predictions. It is an attempt to implement in
mputer code the expert's intuitive decision making processes in a rather narrow field. This decision making is based on knowledge and
perience, and the decisions essentially come to the expert from his or her unconscious mind. These rules have the following form.
a set of variables have been observed to have values,
1)
THEN (a set of output variables will have outcome 01)
an input set I2is observed)
THEN (an output set O2will occur)
.
.
te that the IF/THEN/ELSE structure, that is common in high level languages and could be used here, is not used. It is important to
derstand why this is so, and that expert system type IF/THEN rules are actually equivalent, in their final result, to nested
THEN/ELSE algorithm blocks. All of us who work with procedural computer languages like FORTRAN, C, BASIC and PASCAL
familiar with the IF/THEN/ELSE algorithm, such as in this example.
-
8/13/2019 0824783603 Expert
51/325
Page 44
IF (X1=a OR X2>b) THEN
A1= .true.
ELSEIF (E3=.true. AND E4=.false.) THEN
A2= .true.
ELSEIF (E5=.true. AND 97
-
8/13/2019 0824783603 Expert
52/325
Page 45
he IF/THEN/ELSE block is nested, except now it may be necessary to iterate the evaluation of the expressions, if they are not in the
rrect order implied by the nesting. But even out of order, they can be evaluated. In expert systems, these are rules. In Boolean
ation, they look like this
olean methods are discussed in Chapter 11.
les are not, of course, created by conversion from IF/THEN/ELSE blocks, but the equivalent to nested IF/THEN/ELSE blocks israrchical rules, in which the output from one rule may be an input to another. Thus systems of rules are commonly represented as
ic networks, in which rules, now called "gates", may share inputs with other rules, so that there can be many interconnections and
els.1
mple logic statements such as these are preferable to IF/THEN/ELSE blocks in expert systems for several reasons. The
THEN/ELSE blocks can become very large and complex nested systems, which are extremely difficult to work with. And in the
mple rule form, new rules can be easily added without necessarily disturbing the existing
1Logic networks are discussed in Chapter 5.
-
8/13/2019 0824783603 Expert
53/325
Page 46
es. It makes the Boolean representation possible, with all of the scope available in the methods of Boolean algebra. It makes methods
orporating uncertainty easier to handle. And it makes possible the use of data structured programming, discussed in Chapter 8. In the
vious chapter we discussed pseudo expert systems, in which the rules are not intuition based. It is perhaps now possible to see the
vantages of using the expert system approach in these complex logic systems.
example of a rule from an engineering expert system for robot planning is the following. 2
IF (the robot is not holding anything AND there is an
object that is removable AND the object needs to be
moved AND the object is sitting on another wrong
object AND there is a physical space designed to act
as a buffer)
THEN
Place the part on the buffer
ere are two major difficulties in explaining the procedure for setting up the set of rules for this type of expert system. No standardized
ocedure exists that is generally applicable, and the programmer must use his or her own ingenuity to develop a workable algorithm.
condly, it is difficult to illustrate with examples, because meaningful examples must be too large, whereas
2Provided by Peter Tang.
-
8/13/2019 0824783603 Expert
54/325
Page 47
all ones appear trivial. Commonly there may be many inputs and potential outputs. And there may be a single unique selected output,
several candidates may be selected of similar merit.
e set of rules also usually contains intermediate stages, and can be thought of as having a tree or hierarchical structure. The rules that
resent the modeling are called the knowledge base in the terminology of artificial intelligence.
e inputs to the system are sometimes called the evidence, representing observed facts or data that define the specific application for
ich the expert system is to be used. They can also be specifications, if the system is design related. The outputs from the system are
metimes called the conclusions, advice, or recommendations. Because there can be many inputs and outputs; and as well hundreds or
en thousands of rules in the knowledge base, it is usually not a trivial problem to search through the rules and find the appropriate
al output. The algorithm for doing this is called the control system, or inference engine 3. It is essentially a binary search problem,
te similar to 01 programming in the field of optimization. However workers in the two fields rarely acknowledge one another.
t what constitutes appropriate expertise for a
3Some authors make a distinction between the control structure and the inference engine. See for example Taylor (1988).
-
8/13/2019 0824783603 Expert
55/325
-
8/13/2019 0824783603 Expert
56/325
Page 49
pert may ask for additional evidence before proceeding to the next stage. A typical engineering example would be an expert sytem for
terial selection. In the first stage the expert might select a broad class of material, say aluminum alloy. Additional questions would
n be asked about aspects of the application, and the expert would then go on to decide which aluminum alloy, what heat treatment,
d so on. It thus uses hierarchical concepts, going from the more general to the more specific.
s not surprising, then, that it is difficult to extract rules that only exist in the unconscious mind, and actually in an unknown format.
ocedures are available which could be considered a kind of machine learning, in which the rules are generated by an analysis of
amples for which an expert has given solutions. See Chapter 10. This would actually seem to better simulate the human acquisition of
uition based expertise.
important feature of human expertise is uncertainty. Intuition based judgement is well known to be error prone, and a professional
pert would acknowledge this and take it into consideration when delivering a judgement. He or she would, or should, give some
ication of the degree of certainty embedded in the conclusion or recommendation, so that anyone acting on the advice would know
risk involved. Most expert systems should correspondingly have a mechanism for propogating uncertainty through the logic chain.
ere is considerable variation in methods used to
-
8/13/2019 0824783603 Expert
57/325
Page 50
this. The different approaches include conventional probability, Bayes' theorem, fuzzy set theory, and a kind of pseudo probability.
ot of the difficulty appears to be associated with the reluctance of computer scientists to accept the concept of subjective probability,
isting on a strict frequency definition. The author has argued elsewhere [Siddall 1983] that in engineering design, the only meaningful
nceptual basis for probability is to define it as a measure of one's personal belief that an event will occur, based on experience and
dgement. Observed data is considered only additional information, to assist in making probabilistic judgements. This approach to
obability would also seem to be very appropriate to expert systems, or indeed any application based on intuitive decision making.
ere are a number of capabilities that a good expert system is said to require in addition to providing a final recommendation (Weiss
d Kulikowski 1984); although one must always be careful of overgeneralizing in a discussion of expert systems, and they may not be
propriate to all systems. However they should always be given consideration when developing one. They include the following.
The system will provide, on request, a tracing of the logic chain that led to the conclusion. This is said to be important so that the
er has some insight into how the decision was made, and can apply judgement to possibly
-
8/13/2019 0824783603 Expert
58/325
Page 51
difying it. It is also intended to help in the evaluation and development of a system. This tracing is rather difficult to achieve; and it is
mewhat surprising that a computer is asked to do something, while simulating an expert, that the real expert can rarely do well. If you
k a football quarterback why he made the play that he did in a game, he may give some justification by citing the set of events that
sted at the time, and suggesting bad things that might have resulted if he had made a somewhat different decision. But it will tend to
not very convincing or logical. Can we really expect more from the computer than we do from the real life expert? Possibly this is
e of the superior aspects of computers over humans, that also occur in other applications such as numerical analysis; but we may in
s case be deluding ourselves about the capabilities of the computer.
The system will permit the user to correct previous inputs, and volunteer information not asked for.
The control system operates sequentially, or appears to, so that the user can at any stage ask for the system's interim conclusions.
The system has a data file for storing and retrieving known examples of the related expertise.
It would enhance program development and debugging to be able to do a trace for a case, so that if the system had been modified or
ended, the programmer could easily determine how the conclusion was affected for a trial case,
-
8/13/2019 0824783603 Expert
59/325
Page 52
d where any deviation occurred.
It could be helpful to analyze the effects of incomplete data. The system may be designed so that it would still give the best possible
ommendation, even in the face of missing information. This, in fact, would be a nice feature and correspond to real life situations.
t in this event, some indication would be desirable as to the effect on the probability associated with the conclusion, and the effect if
additional information were available and had a certain form. Would a radically different conclusion have been reached?
It would not be unlikely for inconsistencies to creep into the expert based rules. It might be possible to incorporate some automatic
eck for these; and if they cannot be resolved, at least the user can be informed of their existence, if they appear in some specific
es.
Possibly the most important facility is the ability of the system to accept new rules. A good system should be able to grow, possibly
cause new experts have been consulted, or new expertise has been developed, or new candidates become available, such as a new
stic in a material selection system. It should be possible to add these new rules without a major revision of the coding.
hough the primary role of expert systems is the coding of intuitive expertise in an algorithm, it is important to again emphasize that all
es need not be intuitive. And we may even have all rules based on logic or
-
8/13/2019 0824783603 Expert
60/325
Page 53
deling, with no intuitive input. This would be a pseudo expert system, referred to earlier.
ferences
ddall, J. N. (1983). Probabilistic Engineering Design; Principles and Applications, Marcel Dekker, N.Y.
ylor, W. A. (1988). What Every Engineer Should Know About Artificial Intelligence, MIT Press, Cambridge, Mass., USA.
eiss, S. M. and Kulikowski, C. A. (1984). A Practical Guide to Designing Expert Systems, Rowman & Allanheld, Totawa, New
sey.
oblems
Find or devise any nested IF/THEN/ELSE block with at least three levels. Convert it to a set of IF/THEN rules. Demonstrate by an
aluation of each form that they are equivalent in result. Show that this is true by iteration, even if the second set is out of the order
plied by the IF/THEN/ELSE block nesting.
-
8/13/2019 0824783603 Expert
61/325
Page 55
hases of Developing an Expert System
-
8/13/2019 0824783603 Expert
62/325
Page 57
expert system need not and should not be created as one complete fully rounded system, before testing and development begins. It
ould be created in such a way that it can be started small and gradually expanded. Most writers strongly emphasize a general rule that
knowledge base and the control structure be quite separate. It will also be clear that a high degree of modularization is desirable,
h careful design discipline in keeping track of inputs and outputs to the modules, and of design changes.
e development phases can be usefully categorized in order to get a broad picture of the procedure used in creating an expert system.
has much in common with the general engineering design procedure.
cognition of Need
s important to carefully circumscribe the limits of the expert system; and they must usually be rather narrow. If the need is very
oad in nature, then the system should be decomposed into subsystems.
termination of the True Role of the System
must carefully be determined exactly who will use the system, and for what purpose.
termination of the Outputs
e outputs will have the form of conclusions, recommendations, or predictions.
termination of the Inputs
e inputs will have the form of evidence, or data, or observations, or possibly
-
8/13/2019 0824783603 Expert
63/325
Page 58
als of the user.
rmulation of the Knowledge Base
e human expert will provide the knowledge that is transcribed into logic rules. This phase also includes the structure of the rules - the
der in which they are arranged and classified. There is likely to be some iteration between 3, 4, and 5.
velopment of the Control System
e algorithm for searching through the rules to find the logically true conclusion is done at this stage. Although in the beginning of this
tion it was stated as a design rule that the knowledge base and the control system should be kept separate, this and the previous stage
nnot really be done separately. The structure of the knowledge base, and the binary search procedure, are really rather closely
erconnected, although structurally separate, and iterations of these two stages will be required. This sort of internal looping is, of
urse, typical of the design process.
velopment of the User Interface
is is usually interactive, with the user responding to questions from the computer; but inputs could have other forms, such as sensor
asurements, the result of searches through data files, the results of engineering modeling, and so on. Inputs may be sequential,
curring at some intermediate conclusions reached by the control system, so that all potential system inputs are not necessarily
ivated.
riting of the Prototype System Pseudocode
t as in any development of long and complex software systems, it
-
8/13/2019 0824783603 Expert
64/325
Page 59
highly desirable to develop a detailed algorithm represented by pseudocode. This is more appropriate to procedural languages such as
RTRAN, rather than a functional programming language like LISP, or a logic programming language such as PROLOG. However,
en when using these latter two languages, which are said to be nonalgorithmic, some detailed planning of program structure must be
ne. The experimental prototype should be a subset of the complete system, so that not all inputs, outputs, and rules would be
luded. The user interface would also be rudimentary. The use of this subset makes it easier to debug the algorithm and coding, to test
control system, and the accuracy of the conclusions for trial cases. The testing at this stage cannot be conclusive, but the subset
ould be selected with a view to being a typical representation of the full system.
riting of the Prototype Code
e selection of a language for artificial intelligence applications has been discussed in Chapter 1 . Accumulating evidence from the
rature seems to indicate that the traditional use of LISP is waning somewhat, and is not necessary or even particularly desirable.
actitioners are favoring PROLOG in increasing numbers, but some appear to look on it unfavorably. Forsyth (1984, page 16), for
ample, is quite abusive of PROLOG. The procedural languages most commonly used appear to be C, FORTRAN and PASCAL.
sting
testing of design prototypes leads to
-
8/13/2019 0824783603 Expert
65/325
Page 60
difications, and these will commonly be extensive in expert system development, because of the intuitive nature of the program
ign.
velopment and Refinement of the Full System
is stage will include the addition of more components, a refinement of the user interface, and considerable testing of cases.
odifications during Application
y dynamic device or system will continue to evolve and improve during its application lifetime. New expertise should be
orporated, and new inputs and outputs added. Provision must be made to accommodate this in the structure of the system.
s said (Winston & Prendergast 1984) '' . . . developing a substantial expert system with real performance takes at least five man-
ars of effort, . . .", and the reference goes on to show that some of the well known expert systems described in the literature have
en much longer, up to thirty or forty man-years. These are rather formidable figures, but it is doubtful if expert systems written by
gineers would take so long. The engineer will likely be something of an expert in the subject of the expert system, and even though he
she may call on other experts for substantial assistance, the rapport will be much better, and the engineer will have better insight into
problem than a general purpose "knowledge engineer".
-
8/13/2019 0824783603 Expert
66/325
Page 61
ferences
rsyth, R. (ed.) (1983). Expert Systems; Principles and Case Studies, Chapman and Hall, London.
nston, P. H. and Prendergast, K. A. (1984). The AI Business; the Commercial Use of Artificial Intelligence, MIT Press, Cambridge,
ass.
ggested Reading
rmon, P., Maus, R. and Morrissey, W. (1988). Expert Systems; Tools and Applications, Wiley, N.Y., pp. 171-159.
rsaye, K. and Chignell, M. (1988). Expert Systems for Experts, Wiley, N.Y., pp. 295304.
eiss, S. M. and Kulikowski, C. A. (1984). A Practical Guide to Designing Expert Systems, Rowman & Allanheld, Totawa, New
sey, pp. 13,14.
nston, P . H. and Prendergast, K. A. (eds.) (1984). The AI Business: The Commercial Uses of Artificial Intelligence, MIT Press,
mbridge, Massachusetts, pp. 135.
-
8/13/2019 0824783603 Expert
67/325
Page 63
nowledge Base
-
8/13/2019 0824783603 Expert
68/325
Page 65
roduction
e are concerned here with how the rules are developed; how they are structured so as to make programming, debugging,
difications and control optimum; and the various ways that the knowledge rules can be represented.
quiring and structuring the rules is a fundamental problem in coding an expert system, and the area which writers tend to gloss over,
d be least helpful. This would indicate that there are no standard procedures, and the programmer must simply use ingenuity to devise
hniques for finding the rules, and the best structure for them.
might seem more logical to first discuss inputs and outputs, but it is difficult to get a good grasp of these until one has some insight
o the knowledge base procedures.
e shall avoid any concern about uncertainty in this section, deferring it to a later discussion. The use of machine learning will also be
t to a special section. We shall not discuss the use of shells; an engineer, with programming experience, and some expertise in the
bject, does not really need to use a shell, and may find them lacking in adequate flexibility in designing the control system and the
nagement of uncertainty. In the event that a decision is made to use a shell, it is not difficult to do so with the background
ormation in this book.
-
8/13/2019 0824783603 Expert
69/325
Page 66
quiring the Rules
t us begin by looking at an example that is familiar, easy to set up, and the expertise is well known. It is not really an expert system,
hough it has many of its characteristics; but if programmed, it might be a convenient piece of software, particularly if expanded. It is
apted from Forsyth (1984). Let us call it an expert system for identifying the species of an animal or bird, using observed physical
aracteristics or behaviour patterns. It illustrates the importance of class concepts, and class hierarchies, in developing and structuring
knowledge base. We shall severely limit the number of species that we might identify. These outputs are shown at the top of Figure
. We shall use AND and OR gates to graphically illustrate logic statements. Observed features are associated with circles;
nclusions, either intermediate or final, are enclosed in rectangles. This same representation is used in the design of digital electronicsen it is a physical layout drawing, and in the analysis of failure of complex systems when it is called a fault tree. Note that there are
me intermediate conclusions - mammal, carnivore, ungulate and bird. Note that if certain intermediate conclusions are reached, we do
need to ask for all of the potential inputs. For example, if both "hair" and "gives milk" are true, then an intermediate conclusion is
ammal", and we need not ask if "feathers",
-
8/13/2019 0824783603 Expert
70/325
Page 67
Fig. 5.1
Logic diagram for an expert system to identify certain animals and birds.
-
8/13/2019 0824783603 Expert
71/325
Page 68
es", and "lays eggs" are true. We could think of Figure 5.1 as representing a preliminary sub-set of the complete system, used to test
program in a preliminary way.
s characteristic of expert system rules that OR and AND logic combinations are avoided; although this is not necessarily true. The
ncept of representation by logic gates automatically enforces this.
e next question is - how shall we structure the program that represents the logic diagram? We shall go into this in more detail when
cussing control systems, but for now we shall use the simplest possible approach - putting them down in sequence from the bottom
in Figure 5.1. The following algorithm is represented in pseudocode. Note that parentheses () are used to indicate input items; and
ackets [] are used to indicate a conclusion.
gorithm for Identifying an Animal
put
e following logical variables -
nted teeth, claws, forward eyes, hair, gives milk, eats meat, hoofs, chews cud, feathers, flies, lays eggs, tawny color, dark spots, long
s, black stripes, long neck, cannot fly, black and white, swims, flies
-
8/13/2019 0824783603 Expert
72/325
Page 69
ocedure
Obtain evidence from user
# Determine conclusion #
IF (pointed teeth) AND (claws) AND (forward eyes) THEN
[T1]
IF (hair) OR (gives milk) THEN
[mammal]
IF (eats meat) OR [T1] THEN
[carnivore]
IF [mammal] AND (hoofs) THEN
[T2]
IF [mammal] AND (chews cud) THEN
[T3]
IF (flies) AND (lays eggs) THEN
[T4]
IF [T2] OR [T3] THEN
ntinues
-
8/13/2019 0824783603 Expert
73/325
Page 70
ntinued
[ungulate]
IF (feathers) OR [T4] THEN
[bird]
IF [mammal] AND [carnivore] AND (tawny color) AND(dark spots) THEN
[cheetah]
PRINT "cheetah"
STOP
0. IF [mammal] AND (tawny color) AND [carnivore] AND
(black stripes) THEN
[tiger]
PRINT "tiger"
STOP
1. IF (dark spots) AND (long legs) AND [ungulate] AND
(long neck) THEN
[giraffe]
PRINT "giraffe"
STOP
2. IF (black stripes AND [ungulate] THEN
[zebra]
PRINT "zebra"
STOP
ntinues
-
8/13/2019 0824783603 Expert
74/325
Page 71
ntinued
3. IF (long neck) AND [bird] AND (cannot fly) AND (black
and white) THEN
[ostrich]
PRINT "ostrich"
STOP
4. IF (cannot fly) AND [bird] AND (black and white) AND
(swims expertly) THEN
[penguin]
PRINT "penguin"
STOP
5. IF [bird] AND (flies well) THEN
[albatross]
PRINT "albatross"
STOP
Go to 2
END
e can now test the system with some evidence. Assume that the following input items were determined to be true.
-
8/13/2019 0824783603 Expert
75/325
Page 72
r, gives milk, eats meat, pointed teeth, claws, forward eyes, tawny color, black stripes, cannot fly
e algorithm is now executed and the following rules will have fired.
R1- [T1]
R2- [mammal]
R3- [carnivore]
R10- [tiger]
te that we did not need the (cannot fly) evidence, suggesting that it might be desirable to only supply evidence as needed, in order to
oid unnecessary questioning of the user. This could be significant in large systems.
te also that there is a hierarchy in Figure 5.1, which was used to order the rules. This avoids having a ''don't know" at any point, and
o avoids the need for the iteration feature that was included in the algorithm. However, in complex systems, this hierarchy may be
ficult to maintain or determine, and it is still possible to order the rules randomly. Sufficient iterations will eventually fire the required
es. However we would need a "don't know" feature, so that a rule containing an unknown intermediate conclusion would be skipped.
s generally recommended that the rules be as
-
8/13/2019 0824783603 Expert
76/325
Page 73
mple as possible. Gates could be combined in an IF statement; indeed everything could be combined in an IF/THEN/ELSE block, but
s is avoided. The simple form of the rules, and the random ordering, make changes and additions easy to do. A new rule can be
mply added on to the bottom of the list. However we shall see that some structure for the rules is desirable.
s also interesting at this point to think about some ways to make the algorithm a little more sophisticated. We could, for example,
ociate a flag with each rule, indicating whether or not it has been fired. As each rule is encountered, its flag could be checked, and if
rule has fired, it would be bypassed. The flag could also be used as a tracer, permitting the fired rules to be listed after a run. It also
ght be desirable to have a data file associated with the system, so that if a tiger, for example, has been identified, the user could ask
a lot of additional information about the nature of tigers.
ving gained some insight into how the rules are set up, and how a simple control structure works, we can now begin to think about
w to formulate rules for a new sytem being developed. The only real guideline that is available for establishing rules is to use the
nciple of class concepts and hierarchical arrangement of classes. This is sometimes called taxonomy, and one of its most familiar
plications is is the classification of biological species, using classes such as orders, genera, families,
-
8/13/2019 0824783603 Expert
77/325
Page 74
ecies, sub-species and varieties. This is not, unfortunately, a very revealing guideline, since humans automatically think this way in
y event. The whole structure of our thought and intuitive behaviour is based on class concepts. Consider the simple engineering
ample of bearings; the partial taxonomy is shown in Figure 5.2.
an engineer decides he wants to select a bearing, he first asks himself - do I want a radial or thrust bearing? And he looks for evidence
support a decision. He then asks - should it be a rolling element bearing or a sliding contact bearing? If the application requires very
w friction, high rigidity, and permanent lubrication, he will likely choose a rolling element bearing; and so on through the hierarchy.
us inputs are related to conclu-
Fig. 5.2
Class hierarchy for bearings.
-
8/13/2019 0824783603 Expert
78/325
Page 75
ns through this hierarchical class approach. Each subclass represents an intermediate conclusion.
other engineering example of an actual expert system is one for selecting a welding process and welding rod material for welding
tals (Jones and Turpin 1986). This system has over 100 rules and the inputs include parent material and hardness, material thickness,
ldment position for welding, and so on. The input might include other application details which would be used by the expert to
ermine if there was danger from hydrogen embrittlement, which would be an intermediate conclusion.
nally, consider the fault tree diagram shown in Figure 5.3, taken from Siddall (1983). It represents the possible failure modes of a
wer plant. Again, we are ignoring failure probabilities.
is logic diagram uses some additional symbols, shown in Figure 5.4, plus some symbols that are not used, but could be in otherplications. They correspond to symbolism used in fault tree analysis in reliability theory.
e logic diagram is translated into the following algorithm for an equivalent expert system, used to determine which subsystem failure
used breakdown of the plant. Our outputs are therefore pump system failure, heat exchanger failure, and boiler failure. Intermediate
nclusions represent successive failures of lower level subsystems in the hierarchy.
-
8/13/2019 0824783603 Expert
79/325
-
8/13/2019 0824783603 Expert
80/325
-
8/13/2019 0824783603 Expert
81/325
Page 78
Fig. 5.3
Continued
-
8/13/2019 0824783603 Expert
82/325
Page 79
MBOL NAME LOGIC
AND Output event occurs if all input events occur
OR Output event occurs if one or more input events occur
INHIBITOutput event occurs when input event occurs, if conditional
event has occured
INVERTER Converts the value of a variable to its complement
EXCLUSIVE
OROutput event occurs if one and only one input event occurs
Input event
Input event (Undeveloped event in reliability fault trees)
Conclusion
Transfer symbol to join separated parts of a network
5.4 Logic symbols.
-
8/13/2019 0824783603 Expert
83/325
Page 80
gorithm for Identification of the Subsystem Failure for a Power Plant
put
- motor 1 fails
- valve 1 closes inadvertently
- valve 2 opens inadvertently
- motor 2 fails
- valve 1 fails to close
- valve 2 fails to open- heat exchanger fails externally
- heat exchanger fails internally
- internal heat exchanger failure damages system
- external leak in No. 1 boiler
- external leak in No. 2 boiler
- internal leak in No.1 boiler
- internal leak in No. 2 boiler
- structural failure in No. 1 boiler
- structural failure in No. 2 boiler
- NaK plug in No. 1 boiler
- NaK plug in No. 2 boiler
- mercury side of No. 1 boiler plugs
- performance degrades of mercury side of No. 1 boiler
- erosion or corrosion of mercury side of No. 1 boiler
- mercury side of No. 2 boiler plugs
- performance degrades of mercury side of No. 2 boiler
ntinues
-
8/13/2019 0824783603 Expert
84/325
Page 81
ntinued
- erosion or corrosion of mercury side of No. 2 boiler
- pump No. 1 leaks externally
- pump No. 2 leaks externally
- valve No. 1 leaks externally
- valve No. 2 leaks externally
ocedure
Obtain evidence from user or from sensors
# Determ