Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction From: Chapter 1, Building Expert Systems in Prolog, htm.

Similar presentations


Presentation on theme: "Introduction From: Chapter 1, Building Expert Systems in Prolog, htm."— Presentation transcript:

1 Introduction From: Chapter 1, Building Expert Systems in Prolog, http://www.amzi.com/ExpertSystemsInProlog/xsipfrtop. htm

2 Introduction2 Contents Expert Systems Expert System Features –Goal-Driven Reasoning –Uncertainty –Data Driven Reasoning –Data Representation – User Interface – Explanations Sample Applications Prolog

3 Introduction3 Expert Systems Expert systems are computer applications which embody some non-algorithmic expertise for solving certain types of problems. For example, expert systems are used in diagnostic applications servicing both people and machinery. They also play chess, make financial planning decisions, configure computers, monitor real time systems, underwrite insurance policies, and perform many other services which previously required human expertise.

4 Introduction4 User interface Inference engine Knowledge base Working storage Domain expert Knowledge engineer Expertise Encoded expertise System engineer User Expert system components and human interfaces

5 Introduction5 Expert System Features There are a number of features which are commonly used in expert systems. Some shells provide most of these features, and others just a few. Customized shells provide the features which are best suited for the particular problem. The major features covered in this book are: –Goal driven reasoning or backward chaining ; –Coping with uncertainty; –Data driven reasoning or forward chaining; –Data representation; –User interface; –Explanations.

6 Introduction6 Goal-Driven Reasoning Goal-driven reasoning, or backward chaining, is an efficient way to solve problems that can be modelled as "structured selection" problems. –That is, the aim of the system is to pick the best choice from many enumerated possibilities. For example, an identification problem falls in this category. Diagnostic systems also fit this model, since the aim of the system is to pick the correct diagnosis.

7 Introduction7 Goal-Driven Reasoning The knowledge is structured in rules which describe how each of the possibilities might be selected. The rule breaks the problem into sub-problems. For example, the following top level rules are in a system which identifies birds. IF family is albatross and color is white THEN bird is laysan albatross. IF family is albatross and color is dark THEN bird is black footed albatross. IF order is tubenose and size large and wings long narrow THEN family is albatross.

8 Introduction8 Goal-Driven Reasoning The sub-goals of determining color, size, and wings would be satisfied by asking the user. By having the lowest level sub-goal satisfied or denied by the user, the system effectively carries on a dialog with the user. The user sees the system asking questions and responding to answers as it attempts to find the rule which correctly identifies the bird.

9 Introduction9 Goal-Driven Reasoning Forward Chaining DataRulesConclusion a=1 b=1 If a=1 & b=2 then c=3If c=3 then d=4d=4 Backward Chaining DataRulesConclusion a=1 b=1 If a=1 & b=2 then c=3If c=3 then d=4d=4

10 Introduction10 Uncertainty Often times in structured selection problems the final answer is not known with complete certainty. The expert's rules might be vague, and the user might be unsure of answers to questions. This can be easily seen in medical diagnostic systems where the expert is not able to be definite about the relationship between symptoms and diseases. In fact, the doctor might offer multiple possible diagnoses.

11 Introduction11 Uncertainty For expert systems to work in the real world they must also be able to deal with uncertainty. One of the simplest schemes is to associate a numeric value with each piece of information in the system. The numeric value represents the certainty with which the information is known. There are numerous ways in which these numbers can be defined, and how they are combined during the inference process.

12 Introduction12 Data Driven Reasoning For many problems it is not possible to enumerate all of the possible answers before hand and have the system select the correct one. –For example, configuration problems fall in this category. –These systems might put components in a computer, design circuit boards, or lay out office space. –Since the inputs vary and can be combined in an almost infinite number of ways, the goal driven approach will not work.

13 Introduction13 Data Driven Reasoning The data driven approach, or forward chaining, uses rules similar to those used for backward chaining, however, the inference process is different. The system keeps track of the current state of problem solution and looks for rules which will move that state closer to a final solution.

14 Introduction14 Data Driven Reasoning A system to layout living room furniture would begin with a problem state consisting of a number of unplaced pieces of furniture. Various rules would be responsible for placing the furniture in the room, thus changing the problem state. When all of the furniture was placed, the system would be finished, and the output would be the final state. IF unplaced tv and couch on wall(X) and wall(Y) opposite wall(X) THEN place tv on wall(Y).

15 Introduction15 Data Representation For all rule based systems, the rules refer to data. The data representation can be simple or complex, depending on the problem. The four levels described in this section are illustrated in figure 1.3. The most fundamental scheme uses attribute-value pairs as seen in the rules for identifying birds. Examples are color-white, and size-large.

16 Four levels of data representations attribute-value pairs color-white object-attribute-value triples arm_chair-width-3 straight_chair-width-2 records chair object widthcolortype chair#13orangeeasy chair#22brownstraight frames mammal skinlegs furdefault 4 sizetuskstype largedefault3constraints: indian or african tailsizelegs curlymedium2 elephant monkey

17 Introduction17 User Interface The acceptability of an expert system depends to a great extent on the quality of the user interface. The easiest to implement interfaces communicate with the user through a scrolling dialog. Start of bird identification what is color? >white what is size? >large … The bird is a laysan_albatrose

18 Introduction18 User Interface More advanced interfaces make heavy use of pop- up menus, windows, mice, and similar techniques. goal: bird identification hypothesis-laysan_albatrose what is color? what dark green consultquit

19 Introduction19 Explanations One of the more interesting features of expert systems is their ability to explain themselves. Given that the system knows which rules were used during the inference process, it is possible for the system to provide those rules to the user as a means for explaining the results. This type of explanation can be very dramatic for some systems such as the bird identification system. It could report that it knew the bird was a black footed albatross because it knew it was dark colored and an albatross. It could similarly justify how it knew it was an albatross.

20 Introduction20 Explanations At other times, however, the explanations are relatively useless to the user. –This is because the rules of an expert system typically represent empirical knowledge, and not a deep understanding of the problem domain. –For example a car diagnostic system has rules which relate symptoms to problems, but no rules which describe why those symptoms are related to those problems. Explanations are always of extreme value to the knowledge engineer. –They are the program traces for knowledge bases. –By looking at explanations the knowledge engineer can see how the system is behaving, and how the rules and data are interacting. –This is an invaluable diagnostic tool during development.

21 Introduction21 Sample Applications bird identification system, a car diagnostic system, and a system which places furniture in a living room actual systems used in commercial environments solving Rubik's cube

22 Introduction22 Prolog The details of building expert systems are illustrated in this book through the use of Prolog code. There is a small semantic gap between Prolog code and the logical specification of a program. –This means the description of a section of code, and the code are relatively similar. –Because of the small semantic gap, the code examples are shorter and more concise than they might be with another language.

23 Introduction23 Prolog The expressiveness of Prolog is due to three major features of the language: –rule-based programming, –built-in pattern matching, and –backtracking execution.

24 Introduction24 Prolog There are also arguments in favor of using conventional languages, such as C, for building expert system shells. Usually these arguments center around issues of –portability, –performance, and –developer experience. As newer versions of commercial Prologs have increased sophistication, portability, and performance, the advantages of C over Prolog decrease.


Download ppt "Introduction From: Chapter 1, Building Expert Systems in Prolog, htm."

Similar presentations


Ads by Google