1 0 0 w Expert System Applications 8.f 0 4 0 9- 8 in Chemistry 9 1 k- b 1/ 2 0 1 0. 1 oi: d 9 | 8 9 1 1, er b m e pt e S e: at D n o ati c bli u P In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. 1 0 0 w 8.f 0 4 0 9- 8 9 1 k- b 1/ 2 0 1 0. 1 oi: d 9 | 8 9 1 1, er b m e pt e S e: at D n o ati c bli u P In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. 408 ACS SYMPOSIUM SERIES Expert System Applications in Chemistry Bruce A. Hohne, EDITOR Rohm and Haas Company 1 0 0 w 8.f Thomas H. Pierce, EDITOR 0 4 0 Rohm and Haas Company 9- 8 9 1 k- b 1/ 2 0 1 10. Developed from a symposium sponsored doi: by the Division of Computers in Chemistry 9 | 8 at the 196th National Meeting 9 1 1, of the American Chemical Society, ber Los Angeles, California, m e pt September 25-30,1988 e S e: at D n o ati c bli u P American Chemical Society, Washington, DC 1989 In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. Library of Congress Cataloging-in-Publication Data Expert system applications in chemistry Bruce A. Hohne, editor, Thomas H. Pierce, editor p. cm.—(ACS Symposium Series, 0097-6156; 365). 1 0 0 Developed from a symposium sponsored by the Division w of Computers in Chemistry at the 196nd National Meeting 8.f of the American Chemical Society, Los Angeles, California, 40 September 25-30, 1988. 0 89- Includes bibliographical references. 9 1 k- ISBN 0-8412-1681-9 b 1. Chemistry—Data processing—Congresses. 2. Expert 1/ systems—Congresses. 2 0 0.1 I. Hohne, Bruce A., 1954- . 1. II. Pierce, Thomas 1 H., 1952- . 2. III. American Chemical Society. Division oi: of Computers in Chemistry. IV. American Chemical d Society. Meeting (196th: 1988: Los Angeles, Calif.). 9 | V. Series 8 19 QD39.3.E46E96 1989 1, 540'.285'633— ber dc20 89-35271 CIP m e pt e S e: at D Copyright © 1989 n o ati American Chemical Society c bli All Rights Reserved. The appearance of the code at the bottom of the first page of each u chapter in this volume indicates the copyright owner's consent that reprograpnic copies P of the chapter may be made for personal or internal use or for the personal or internal use of specific clients. This consent is given on the condition, however, that the copier pay the stated per-copy fee through the Copyright Clearance Center, Inc., 27 Congress Street, Salem, MA 01970, for copying beyond that permitted by Sections 107 or 108 of the U.S. Copyright Law. This consent does not extend to copying or transmission by any means—graphic or electronic—for any other purpose, such as for general distribution, for advertising or promotional purposes, for creating a new collective work, for resale, or for information storage and retrieval systems. The copying fee for each chapter is indicated in the code at the bottom of the first page of the chapter. The citation of trade names and/or names of manufacturers in this publication is not to be construed as an endorsement or as approval by ACS of the commercial products or services referenced herein; nor should the mere reference herein to any drawing, specification, chemical process, or other data be regarded as a license or as a conveyance of any right or permission to the holder, reader, or any other person or corporation, to manufacture, reproduce, use, or sell any patented invention or copyrighted work that may in any way be related thereto. Registered names, trademarks, etc., used in this publication, even without specific indication thereof, are not to be considered unprotected by law. PRINTED IN THE UNITED STATES OF AMERICA In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. ACS Symposium Series M. Joan Comstock, Series Editor 1989 ACS Books Advisory Board Paul S. Anderson Mary A. Kaiser 1 Merck Sharp & Dohme Research E. I. du Pont de Nemours and 0 w0 Laboratories Company 8.f 0 04 Alexis T. Bell Michael R. Ladisch 9- Purdue University 8 University of California—Berkeley 9 1 bk- John L. Massingill 21/ Harvey W. Blanch Dow Chemical Company 0 University of California—Berkeley 1 0. doi: 1 Malcolm H. Chisholm UDnainveiresl itMy .o f QIouwinan 9 | Indiana University 8 19 James C. Randall 1, Alan Elzerman Exxon Chemical Company ber Clemson University m e Elsa Reichmanis Sept John W. Finley AT&T Bell Laboratories e: Nabisco Brands, Inc. Dat C. M. Roland ation Natalie Foster U.S. Naval Research Laboratory c Lehigh University bli Stephen A. Szabo u P Conoco Inc. Marye Anne Fox The University of Texas—Austin Wendy A. Warr Imperial Chemical Industries G. Wayne Ivie U.S. Department of Agriculture, Robert A. Weiss Agricultural Research Service University of Connecticut In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. Foreword The ACS SYMPOSIUM SERIES was founded in 1974 to provide a medium for publishing symposia quickly in book form. The format of the Series parallels that of the continuing ADVANCES IN CHEMISTRY SERIES except that, in order to save time, the papers are not typeset but are reproduced as they are submitted 1 by the authors in camera-ready form. Papers are reviewed under 0 w0 the supervision of the Editors with the assistance of the Series 8.f Advisory Board and are selected to maintain the integrity of the 0 4 0 symposia; however, verbatim reproductions of previously pub 9- 98 lished papers are not accepted. Both reviews and reports of 1 k- research are acceptable, because symposia may embrace both b 1/ types of presentation. 2 0 1 0. 1 oi: d 9 | 8 9 1 1, er b m e pt e S e: at D n o ati c bli u P In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. Preface THIS IS THE SECOND TIME we have organized a symposium on artificial intelligence (AI) and prepared a book based on the symposium. Since our first effort (Artificial Intelligence Applications in Chemistry, ACS 1 Symposium Series 306), the field has changed dramatically, in large part 0 pr0 because of the advent of commercially available PC-based expert system 8. software. Expert system development has moved out of the hands of the 0 4 0 AI gurus and into the hands of practicing chemists. This is a positive 9- 98 step for the field of chemistry. There no longer appears to be a danger of 1 k- AI being dismissed as a fad or held back through lack of interest from b 21/ the chemical community. Now, the issues have become cost effectiveness, 0 0.1 intellectual property protection, and application selection. 1 oi: The main thrust of this book is to present examples of how expert 9 | d systems can solve chemical problems. To make the book more useful to 8 novices in the field of artificial intelligence, we have written a brief 9 1 1, introductory chapter explaining expert systems. The glossary at the end er of the introduction should be of help to novices and experts alike. We b m e have also included highlights of a panel discussion held at the pt Se symposium. The panel was posed the question, "Can knowledge bases be ate: made generally available in a useful format?" Unfortunately, more issues D n were raised than questions answered. o ati We wish to thank the authors who contributed their time and ideas c bli to the symposium and the book. In addition, we would like to thank the u P staff of the ACS Books Department, both for their advice and for providing us the opportunity to publish this book. Finally, we acknowledge the encouragement and support we received from our management at Rohm and Haas Company. BRUCE A. HOHNE THOMAS H. PIERCE Rohm and Haas Company Rohm and Haas Company Spring House, PA 19477 Bristol, PA 19007 July 5, 1989 xi In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. Chapter 1 Introduction Expert System Applications in Chemistry Bruce A Hohne1 and Thomas H. Pierce2 1Rohm and Haas Company, Spring House, PA 19477 1 2Rohm and Haas Company, Bristol, PA 19007 0 0 h c 8. This symposium series volume is the second of its kind (1). Both 0 4 0 symposia were organized with several purposes in mind. The first, 9- 8 and most general, is simply to expose the chemical community to 9 k-1 expert systems. Expert systems should be of interest to people in a 1/b wide variety of fields of chemistry. The second is to educate chemists 02 in the capabilities of expert systems; both what they can and can not 1 0. do for them. Finally, by presenting a variety of applications, it was 1 oi: hoped that attendees would generate further new ideas for expert 89 | d osypsptoermtu napitpyl itcoa trieovnise. w Tthhee s percoognrde sssy mofp ossoimuem opfr tehseen wteodr kt hdee sacdridbietdi oinna l 9 1 the first symposium. 1, er The first symposium, presented at the fall meeting of the mb American Chemical Society in 1985, was open to any type of artificial pte intelligence application. The second symposium was restricted to e S expert systems. This is only a minor restriction because most ate: practical artificial intelligence applications to date have used expert D n systems in one form or another. Below is a brief overview of expert atio systems. More information on expert systems for chemistry can be c found in reference 2. General expert system information can be ubli found in references 3 and 4. Because artificial intelligence has P developed its own vocabulary, a short glossary is also included. Expert Systems Expert systems are programs that attempt to solve problems in a way similar to how a human expert would solve them. They incorporate "rules of thumb" that experts in the field have developed through years of experience. The problems attacked are not necessarily procedural, they are often vague, complex, and can contain incomplete or inexact information. Expert systems contain three basic pieces: a knowledge base, an inference engine, and a user interface. The knowledge base contains the information which the program uses to reach decisions. A key 0097-6156/89/0408-0002$06.00/0 o 1989 American Chemical Society In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. 1. HOHNE & PIERCE Introduction: Expert System Applications in Chemistry 3 difference between expert systems and classical computer programs is the fact that the knowledge is separated from the program. The inference engine is the program that manipulates the knowledge base to reach these decisions. The user interface allows the program and chemist to communicate with each other in an effective manner. These three pieces of an expert system are described below. Knowledge Base. The knowledge base of an expert system is a resource of information about a specific domain, or problem area. The knowledge base is the most important part of the expert system, and the most difficult to construct. The completeness and accuracy of the knowledge base will determine how well the expert system will perform solving problems. The scope of problems which can be solved is completely determined by the scope of the knowledge base. 01 Knowledge must be encoded in such a way that it can be a) 0 ch entered into the computer; b) manipulated by the inference engine; 08. c) understood by the expert. There are several common ways to 4 9-0 encode the expert's knowledge, each with its own advantages and 8 disadvantages. The encoding scheme must match the underlying 9 1 k- structure of the knowledge. b 1/ The two most common methods of encoding knowledge are 2 0 production rules and frames. Sometimes both methods are used. 1 0. Production rules take the form: IF x is true THEN y is true. For 1 oi: example: d 9 | 8 IF the pH is less than 7 9 1 1, THEN the solution is acidic. er b m The left hand side (x) may contain any number of clauses combined e pt by Boolean algebra operators. In all but the simplest expert systems e e: S it is possible to include the expert's confidence in the conclusion. A at frame describes hierarchical dependencies between objects. In a D n frame, the upper level (or parent) object passes attributes to the o ati objects beneath it in the hierarchy (children). In other words, children blic inherit attributes from their parents. For example: u (FRAME - Alcohol P (SLOT - Reactions (VALUE - "Oxidized by permanganate") (VALUE - "...")) (SLOT - Infrared Absorbances (VALUE - 3600 cm1 - 3100 cm1))) (FRAME - Ethanol (SLOT - Chemical Class (VALUE - Alcohol))) Inference Engine. The inference engine is the central program which manipulates the rules and facts in the knowledge base to reach conclusions. The structure of the inference engine depends strongly upon the type of knowledge base which the expert system incor- In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989. 4 EXPERT SYSTEM APPLICATIONS IN CHEMISTRY porates. Inherent in all of the program structures, however, is a basic set of functions which expert systems perform. These functions are described below using an example knowledge base which incorporates production rules. The inference engine may approach the problem from either the top or the bottom, beginning with either facts or conclusions. If a user begins with several hypotheses and wants to determine which, if any, are correct, then the program should examine all the facts using a goal-directed (also called goal-driven) approach. However, if the user begins with a series of facts which are known to be true and wants to determine what conclusions can be reached, the program should use a data-directed (also called data-driven) approach. A goal-directed expert system begins with a limited set of possible hypotheses and attempts to prove the validity of each one. 01 This type of expert system uses a reverse-chaining (also called 0 h backward-chaining) algorithm. The knowledge base is searched to c 8. find a rule which concludes the initial hypothesis. The IF-clauses 0 4 0 from this rule then becomes the hypotheses for the next level of the 9- 8 search. The process continues until all of the remaining IF-clauses 9 k-1 are known to be true (hypothesis is true) or until no more rules apply 1/b (hypothesis is false). This approach starts at the bottom (conclusions) 02 and works its way to the top (facts). An example of this mechanism 1 0. is illustrated by an HPLC trouble-shooting problem: 1 oi: 89 | d possibAl e spcrioebnlteimst iiss a ebxrpoekrieenn cpiunmg pp. roTbhleem esx pweritt hs yasnte mH PseLaCr.c hesO intes 9 1, 1 rules for one that concludes the pump is broken. It may find a rule er like: mb IF "there is no solvent flow" pte "all tubing is properly connected" e S "there are no obstructions" ate: "the solvent program module is functioning" D n THEN "the pump is broken". o ati c The next step would be to search for rules which conclude "there ubli is no solvent flow". The process would continue until the conclusion P "the pump is broken" is either proved or disproved. In this example, the chemist would be asked to input information whenever an IF clause was an observable symptom of an HPLC problem. Data-directed expert systems begin with a list of the facts known to be true, and see what conclusions can be drawn from those facts. This type of expert system uses a forward-chaining mechanism. Each rule in the knowledge base is tested to see if all of its IF clauses are contained in the list of known facts. When such a rule is found, the system adds the THEN-clauses from the rule to the list of known facts. All the rules in the knowledge base are scanned repetitively until no new facts can be concluded. An example of using forward- chaining is illustrated by a structure elucidation problem based on an IR spectrum: In Expert System Applications in Chemistry; Hohne, B., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1989.