This 4th edition is a major revision of the internationally used textbook on expert systems and programming in the CLIPS expert system tool. Ex pert systems have experienced tremendous growth and popularity since their commercial introduction in the 1980s. Today, expert systems are widely used in bus iness, science, engineering, agriculture, manufacturing, medicine, videogames, and virtually every other field. In fact, it's difficult to think of a field in which expert systems are not used today.
This book is meant to educate students about expert systems theory and programming. The material is written at the upper-division/graduate level suitable for majors in computer science, management information systems, software engineering, and other fields who are interested in expert systems. New terminology is shown in boldface and immediately explained and indexed. Numerous examples and references help clarify the meaning of the text and provide guidance for supplementary reading. In this new 4th edition, links to many new free and trial versions of software tools that can serve as the basis of additional exercise and learning materials are also in Appendix G.
The discussion of new material is generally treated in the historical context so that students can appreciate why the material was developed, not just how to use it. It is this focus on why new techniques have to be invented to solve problems that is at the heart of education, rather than training courses which focussimply on how to use an application.
Expert Systems: Principles and Programming is divided into two parts: the-ory in Chapters 1-6, and programming in the CLIPS expert systems tool in Chapters 7-12. The first part comprises the theory behind expert systems and how expert systems fit into the scope of computer science.
While a previous course in Artificial Intelligence (AI) is helpful, this book provides a self-contained introduction to AI topics in Chapter 1 that are appropriate for expert systems. Naturally a single chapter cannot cover what is contained in entire books on AI. However it is adequate for a broad survey of AI and the role expert systems was developed for. The first part of the book covers the logic, probability, data structures, AI concepts, and other topics that form the theory of expert systems.
We have tried to explain the theory behind expert systems so that a studentmay make an informed decision regarding the appropriate use of expert system technology. The important point we emphasize is that like any other tool, expert systems have advantages and disadvantages. The theory also explains how ex-pert systems relate to other programming methods such as conventional programming. Another reason for discussing theory is that the student can read cur-rent research papers in expert systems, but, because expert systems draw from so many diverse fields, it is difficult for a beginner to just start reading papers with comprehension.
The second part of this book is an introduction to the CLIPS expert system tool. This part is a practical introduction to expert system programming that serves to reinforce and clarify the theoretical concepts developed in the first part. As with the theory part of the book, the programming part can be understood by students with some programming experience in a high-level language. Students learn the practical problems associated with expert system development using CLIPS, a modem, powerful expert system tool.
A new feature discussed in this 4th edition is COOL, the CLIPS Object-Oriented Language. COOL allows expert systems to be developed entirely using objects, or with both rules and objects in a hybrid approach. The advantage of an object-oriented approach is that sets of knowledge can be conveniently grouped in larger collections than individual rules. All the normal properties of objects-such as multiple inheritance-make it easy to extend objects with more specialized knowledge rather than "reinventing the wheel" and coding from scratch each time as in the case of a pure role system. The 4th edition also discusses the procedural programming capabilities of CLIPS, including global variables, functions, and generic functions.
The first versions of CLIPS were developed by NASA at the Johnson Space Center where Gary Riley was the lead programmer in developing its rule-based components. Joseph C. Giarratano served as consultant and wrote the official NASA CLIPS User Guides. Today, CLIPS is used for real-world projects in government, business, and industry, and virtually everywhere. A search using any. Internet search engine will turn up hundreds or thousands of references to expert systems written in CLIPS, and courses at many universities around the world that use CLIPS.
Because the CLIPS source code is portable, it can be run on virtually any computer or operating system that supports an ANSI C or C++ compiler. The CD-ROM included with this book contains: CLIPS executables for Windows ,and Mac OS; the CLIPS Reference Manual and CLIPS Users Guide; and thewell-documented complete C source code for CLIPS.
Some expert systems courses have a term project associated with them. Aproject is an excellent way to develop skills in expert systems. Students usually complete small expert systems of 50-150 rules in a semester project of their choice. Thousands of projects and hundreds of courses based on this book havebeen done including medical, automobile diagnosis, taxi scheduling, personnelscheduling, computer network management, weather forecasting, stock market prediction, consumer buying advice, and many others. A search using an Inter-net search engine will reveal many courses and resources such as Power Point slides, syllabi, and assignments developed by universities around the world. The suggested plan for a one-semester course is as follows:
1. Cover Chapter 1 to provide a quick introduction to expert systems. In particular, assign Problems 1, 2, and 3.
2. Cover Chapters 7-10 to introduce the basic programming in CLIPS. It is helpful for students to recode Problem 2 of Chapter 1 to contrast the ex-pert system approach with the language they originally used in Chapter 1. This contrast is very useful in pointing out the differences between a rule based language such as CLIPS, and LISP, PROLOG, or whatever the original language used for Problem 2. Alternatively, after Chapter 10, the in structor may return to the theory section. If students have a strong back ground in logic and PROLOG, most of Chapters 2 and 3 may be skipped. Students who have had a LISP-based introductory Al course or none at all will benefit from Chapters 2 and 3 if a strong emphasis on logic and the fundamental theory of expert systems is desired. If students have a strong background in probability and statistics, the material in Chapter 4 up to Section 4.11 can be skipped.
3. Chapters 4 and 5 discuss the topic of dealing with uncertainty. This is very important since human beings deal with uncertainty all the time and without it, expert systems would be no more than simple decision trees. Uncertainty topics include probabilistic and Bayesian inference, certaintyfactors, Dempster Shafer theory, and fuzzy theory. Students will gain an understanding of these methods in sufficient detail so that they can read current papers in the field and start doing research, if desired.
4. Chapter 6 discusses knowledge acquisition and the software engineering of expert systems; it is meant for those students planning to work on large expert systems. It is not necessary to discuss this chapter before assigning term projects. In fact, it would be best to cover this chapter last so that the student can appreciate all the factors that go into building a quality expert system .
SUPPLEMENTAL RESOURCES
A manual with solutions to the odd-numbered problems and selected even numbered programs, as well as a complete PowerPoint presentation, are available for download from the publisher's website, http://www.course.com. In addition, many Web links to software and other resources have been added throughout the text. These resources have been chosen so that students can gain a better hands-on understanding of the topics, such as logic and probability, by using software to experiment with non-trivial problems instead of doing problems only be hand. A large number of resources on Al, logic, probability, Bayesian inference, fuzzy logic, and other topics have also been included so that students will have a broader knowledge of the AI and expert systems community worldwide.
CONTRIBUTORS TO CLIPS
We would like to thank all of the people who contributed to the success of CLIPS. As with any large project, CLIPS is the result of the efforts of numerous people. The primary contributors have been: Robert Savely, Chief Scientist of Advanced Software Technology at JSC, who conceived the project and provided overall direction and support; Chris Culbert, Branch Chief of the Software Technology Branch, who managed the project and wrote the original CLIPS Reference Manual; Gary Riley, who designed and developed the rule-based portion of CLIPS, co-authored the CLIPS Reference Manual and CLIPS Architecture Manual, developed the Macintosh interface for CLIPS, and maintains CLIPS as well as the official CLIPS website at http://www.ghg.net/ clips/CLIPS.html; Brian Donnell, who developed the CLIPS Object Oriented Language (COOL), co-authored the CLIPS Reference Manual and CLIPS Architecture Manual; Bebe Ly, who developed the X Window interface for CLIPS; Chris Ortiz, who developed the Windows 3.1 interface for CLIPS; Dr. Joseph Giarratano of the University of Houston Clear Lake, who wrote the official NASA CLIPS User Guide for each release of CLIPS by NASA; and especially Frank Lopez, who wrote the original prototype version of CLIPS.
ACKNOWLEDGEMENTS
.In writing this book, a number of people have made very helpful comments: Ted Leibfried, Jeanne Leslie, MacUmphrey, Terry Feagin, Dennis Murphy, Jenna Giarratano, and Melissa Giarratano. We would also like to acknowldge the feedback of the 4th edition reviewers: Chien-Chung Chart, University of Akron; Constantine Vassiliadis, Ohio University: Jenny Scott, Concordia University-Canada; and Anthony Zygmont, Villanova Univefsity.
We also wish to thank the many people who have added enhancements to CLIPS over the 20 years since its first release in 1985. By providing the complete source code for CLIPS available free, the open source community has greatly expanded the power and popularity of CLIPS to a degree we did not dream of back in 1985 when we were just developing CLIPS. At that time expert systems was still a new and untested technology and no one knew if it would stand the test of time. Over the last 20 years CLIPS has grown from a modest beginning at NASA to being used by thousands of people in a world wide community proving the benefits of CLIPS in virtually every area. We particularly want to thank all these developers who have expanded the power and capabilities of CLIPS, turning what was once a small and risky project meant only as a simple trial of AI technology at NASA into to a worldwide phenome-non.
One person who has contributed to the spread of expert systems in a signifi cant way is Ernest Friedman-Hill who independently wrote a version of CLIPS in Java called JESS with new features. He has also written a book on JESS, Jess in Action: Rule-Based Systems in Java, with a number of interesting projects.
JESS: (http:llherzberg.ca.sandia.govljessl) that complement CLIPS, and KAPICLIPS 1.0: (http://www.cs.umbc.edu/kqml/software/kapiclips.shtml)