



























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




























Expert Systems (ES) are a popular and useful application area in AI. Having studied KRR, it is instructive to study ES to see a practical manifestation of the principles learnt there.
Before we attempt to define an expert system, we have look at what we take the term ‘expert’ to mean when we refer to human experts. Some traits that characterize experts are:
Try to think of the various traits you associate with experts you might know, e.g. skin specialist, heart specialist, car mechanic, architect, software designer. You will see that the underlying common factors are similar to those outlined above.
According to Durkin, an expert system is “A computer program designed to model the problem solving ability of a human expert”. With the above discussion of experts in mind, the aspects of human experts that expert systems model are the experts:
Before we begin to study development of expert systems, let us get some historical perspective about the earliest practical AI systems. After the so-called dark ages in AI, expert systems were at the forefront of rebirth of AI. There was a realization in the late 60’s that the general framework of problem solving was not enough to solve all kinds of problem. This was augmented by the realization that specialized knowledge is a very important component of practical systems. People observed that systems that were designed for well-focused problems and domains out performed more ‘general’ systems. These observations provided the motivation for
expert systems. Expert systems are important historically as the earliest AI systems and the most used systems practically. To highlight the utility of expert systems, we will look at some famous expert systems, which served to define the paradigms for the current expert systems.
Dendral was one of the pioneering expert systems. It was developed at Stanford for NASA to perform chemical analysis of Martian soil for space missions. Given mass spectral data, the problem was to determine molecular structure. In the laboratory, the ‘generate and test’ method was used; possible hypothesis about molecular structures were generated and tested by matching to actual data. There was an early realization that experts use certain heuristics to rule out certain options when looking at possible structures. It seemed like a good idea to encode that knowledge in a software system. The result was the program Dendral, which gained a lot of acclaim and most importantly provided the important distinction that Durkin describes as: ‘Intelligent behavior is dependent, not so much on the methods of reasoning, but on the knowledge one has to reason with’.
MYCIN was developed at Stanford to aid physicians in diagnosing and treating patients with a particular blood disease. The motivation for building MYCIN was that there were few experts of that disease, they also had availability constraints. Immediate expertise was often needed because they were dealing with a life- threatening condition. MYCIN was tested in 1982. Its diagnosis on ten selected cases was obtained, along with the diagnosis of a panel of human experts. MYCIN compositely scored higher than human experts!
MYCIN was an important system in the history of AI because it demonstrated that expert systems could be used for solving practical problems. It was pioneering work on the structure of ES (separate knowledge and control), as opposed to Dendral, MYCIN used the same structure that is now formalized for expert systems.
R1/XCON is also amongst the most cited expert systems. It was developed by DEC (Digital Equipment Corporation), as a computer configuration assistant. It was one of the most successful expert systems in routine use, bringing an estimated saving of $25million per year to DEC. It is a classical example of how an ES can increase productivity of organization, by assisting existing experts.
Assisting expert Assisting an expert is the most commonly found role of an ES. The goal is to aid an expert in a routine tasks to increase productivity, or to aid in managing a complex situation by using an expert system that may itself draw on experience of other (possibly more than one) individuals. Such an expert system helps an expert overcome shortcomings such as recalling relevant information. XCON is an example of how an ES can assist an expert.
Expert systems may be used in a host of application areas including diagnosis, interpretation, prescription, design, planning, control, instruction, prediction and simulation.
Control applications In control applications, ES are used to adaptively govern/regulate the behavior of a system, e.g. controlling a manufacturing process, or medical treatment. The ES obtains data about current system state, reasons, predicts future system states and recommends (or executes) adjustments accordingly. An example of such a system is VM (Fagan 1978). This ES is used to monitor patient status in the intensive care unit. It analyses heart rate, blood pressure and breathing measurements to adjust the ventilator being used by the patient.
Design ES are used for design applications to configure objects under given design constraints, e.g. XCON. Such ES often use non-monotonic reasoning, because of implications of steps on previous steps. Another example of a design ES is PEACE (Dincbas 1980), which is a CAD tool to assist in design of electronic structures.
Diagnosis and Prescription An ES can serve to identify system malfunction points. To do this it must have knowledge of possible faults as well as diagnosis methodology extracted from technical experts, e.g. diagnosis based on patient’s symptoms, diagnosing malfunctioning electronic structures. Most diagnosis ES have a prescription subsystem. Such systems are usually interactive, building on user information to narrow down diagnosis.
Instruction and Simulation ES may be used to guide the instruction of a student in some topic. Tutoring applications include GUIDON (Clancey 1979), which instructs students in diagnosis of bacterial infections. Its strategy is to present user with cases (of which it has solution). It then analyzes the student’s response. It compares the students approach to its own and directs student based on differences.
Simulation ES can be used to model processes or systems for operational study, or for use along with tutoring applications
Interpretation According to Durkin, interpretation is ‘Producing an understanding of situation from given information’. An example of a system that provides interpretation is FXAA (1988). This ES provides financial assistance for a commercial bank. It looks at a large number of transactions and identifies irregularities in transaction trends. It also enables automated audit.
Planning and prediction ES may be used for planning applications, e.g. recommending steps for a robot to carry out certain steps, cash management planning. SMARTPlan is such a system, a strategic market planning expert (Beeral, 1993). It suggests appropriate marketing strategy required to achieve economic success. Similarly, prediction systems infer likely consequences from a given situation.
Appropriate domains for expert systems
When analyzing a particular domain to see if an expert system may be useful, the system analyst should ask the following questions:
Having discussed the scenarios and applications in which expert systems may be useful, let us delve into the structure of expert systems. To facilitate this, we use the analogy of an expert (say a doctor) solving a problem. The expert has the following:
The knowledge base is the part of an expert system that contains the domain knowledge, i.e.
As we have emphasised several times, the power of an ES lies to a large extent in its richness of knowledge. Therefore, one of the prime roles of the expert system designer is to act as a knowledge engineer. As a knowledge engineer, the designer must overcome the knowledge acquisition bottleneck and find an effective way to get information from the expert and encode it in the knowledge base, using one of the knowledge representation techniques we discussed in KRR.
As discussed in the KRR section, one way of encoding that knowledge is in the form of IF-THEN rules. We saw that such representation is especially conducive to reasoning.
The working memory is the ‘part of the expert system that contains the problem facts that are discovered during the session’ according to Durkin. One session in the working memory corresponds to one consultation. During a consultation:
The inference engine can be viewed as the processor in an expert system that matches the facts contained in the working memory with the domain knowledge contained in the knowledge base, to draw conclusions about the problem. It works with the knowledge base and the working memory, and draws on both to add new facts to the working memory.
If the knowledge of an ES is represented in the form of IF-THEN rules, the Inference Engine has the following strategy: Match given facts in working memory to the premises of the rules in the knowledge base, if match found, ‘fire’ the conclusion of the rule, i.e. add the conclusion to the working memory. Do this repeatedly, while new facts can be added, until you come up with the desired conclusion.
We will illustrate the above features using examples in the following sections
Let’s look at the example above to see how the knowledge base and working memory are used by the inference engine to add new facts to the working memory. The knowledge base column on the left contains the three rules of the system. The working memory starts out with two initial case facts:
father (M.Tariq, Ali) father (M.Tariq, Ahmed)
The inference engine matches each rule in turn with the rules in the working memory to see if the premises are all matched. Once all premises are matched, the rule is fired and the conclusion is added to the working memory, e.g. the premises of rule 1 match the initial facts, therefore it fires and the fact brother(Ali, Ahmed is fired). This matching of rule premises and facts continues until no new facts can be added to the system. The matching and firing is indicated by arrows in the above table.
Knowledge Base Rule 1: IF father (X, Y) AND father (X, Z) THEN brother (Y, Z) Rule 2: IF father (X, Y) THEN payTuition (X, Y) Rule 3: IF brother (X, Y) THEN like (X, Y)
Working Memory father (M.Tariq, Ali) father (M.Tariq, Ahmed)
brother (Ali, Ahmed) payTuition (M.Tariq, Ali) payTuition (M.Tariq,Ahmed) like (Ali, Ahmed)
The answer to this is the sequence of reasoning steps as shown with the arrows in the table below.
The arrows above provide the explanation for how the fact like(Ali, Ahmed) was added to the working memory.
Having looked at the basic operation of expert systems, we can begin to outline desirable properties or characteristics we would like our expert systems to possess.
ES have an explanation facility. This is the module of an expert system that allows transparency of operation, by providing an explanation of how the inference engine reached the conclusion. We want ES to have this facility so that users can have knowledge of how it reaches its conclusion.
An expert system is different from conventional programs in the sense that program control and knowledge are separate. We can change one while affecting the other minimally. This separation is manifest in ES structure; knowledge base, working memory and inference engine. Separation of these components allows changes to the knowledge to be independent of changes in control and vice versa.
”There is a clear separation of general knowledge about the problem (the rules forming the knowledge base) from information about the current problem (the input data) and methods for applying the general knowledge to a problem (the rule interpreter).The program itself is only an interpreter (or general reasoning mechanism) and ideally the system can be changed simply by adding or subtracting rules in the knowledge base” (Duda)
Besides these properties, an expert system also possesses expert knowledge in that it embodies expertise of human expert. If focuses expertise because the larger the domain, the more complex the expert system becomes, e.g. a car diagnosis expert is more easily handled if we make separate ES components for engine problems, electricity problems, etc. instead of just designing one component for all problems.
We have also seen that an ES reasons heuristically, by encoding an expert’s rules- of-thumb. Lastly, an expert system, like a human expert makes mistakes, but that is tolerable if we can get the expert system to perform at least as well as the human expert it is trying to emulate.
Conventional programming is a sequential, three step process: Design, Code, Debug. Knowledge engineering, which is the process of building an expert system, also involves assessment, knowledge acquisition, design, testing, documentation and maintenance. However, there are some key differences between the two programming paradigms.
Conventional programming focuses on solution, while ES programming focuses on problem. An ES is designed on the philosophy that if we have the right knowledge base, the solution will be derived from that data using a generic reasoning mechanism.
Unlike traditional programs, you don’t just program an ES and consider it ‘built’. It grows as you add new knowledge. Once framework is made, addition of knowledge dictates growth of ES.
The main people involved in an ES development project are the domain expert, the knowledge engineer and the end user.
Domain Expert A domain expert is ‘A person who posses the skill and knowledge to solve a specific problem in a manner superior to others’ (Durkin). For our purposes, an expert should have expert knowledge in the given domain, good communication skills, availability and readiness to co-operate.
Doctor example (forward chaining)
Rules
Rule 1 IF The patient has deep cough AND We suspect an infection THEN The patient has Pneumonia
Rule 2 IF The patient’s temperature is above 100 THEN Patient has fever
Rule 3 IF The patient has been sick for over a fortnight AND The patient has a fever THEN We suspect an infection
Case facts
First Pass Rule, premise Status Working Memory 1, 1 Deep cough
True Temp= 103 Sick for a month Coughing fits 1, 2 Suspect infection
Unknown Temp= 103 Sick for a month Coughing fits 2, 1 Temperature>
True, fire rule Temp= 103 Sick for a month Coughing fits Patient has fever
Second Pass Rule, premise Status Working Memory 1, 1
Deep cough
True Temp= 103 Sick for a month Coughing fits Patient has fever 1, 2 Suspect infection
Unknown Temp= 103 Sick for a month Coughing fits Patient has fever 3, 1 Sick for over fortnight
True Temp= 103 Sick for a month Coughing fits Patient has fever 3, 2 Patient has fever
True, fire Temp= 103 Sick for a month Coughing fits Patient has fever Infection
Third Pass Rule , premise Status Working Memory 1, 1
Deep cough
True Temp= 103 Sick for a month Coughing fits Patient has fever Infection 1, 2 Suspect infection
True, fire Temp= 103 Sick for a month Coughing fits Patient has fever Infection Pneumonia
Now, no more facts can be added to the WM. Diagnosis: Patient has Pneumonia.
Issues in forward chaining
Undirected search
There is an important observation to be made about forward chaining. The forward chaining inference engine infers all possible facts from the given facts. It has no way of distinguishing between important and unimportant facts. Therefore, equal time spent on trivial evidence as well as crucial facts. This is draw back of this approach and we will see in the coming section how to overcome this.
Backward chaining is an inference strategy that works backward from a hypothesis to a proof. You begin with a hypothesis about what the situation might be. Then you prove it using given facts, e.g. a doctor may suspect some disease and proceed by inspection of symptoms. In backward chaining terminology, the hypothesis to prove is called the goal.
Approach
As you look at the example for backward chaining below, notice how the approach of backward chaining is like depth first search.
Backward chaining example
Consider the same example of doctor and patient that we looked at previously
Rules Rule 1 IF The patient has deep cough AND We suspect an infection THEN The patient has Pneumonia
Rule 2 IF The patient’s temperature is above 100 THEN Patient has fever
Rule 3 IF The patient has been sick for over a fortnight AND The patient has fever THEN We suspect an infection
Goal
Patient has Pneumonia
Step Description Working Memory 1 Goal: Patient has pneumonia. Not in working memory 2 Find rules with goal in conclusion: Rule 1 3 See if rule 1, premise 1 is known, “the patient has a deep cough 4 Find rules with this statement in conclusion. No rule found. “The patient has a deep cough” is a primitive. Prompt patient. Response: Yes.
Deep cough
5 See if rule 1, premise 2 is known, “We suspect an infection”
Deep cough
6 This is in conclusion of rule 3. See if rule 3, premise 1 is known, “The patient has been sick for over a fortnight”
Deep cough
7 This is a primitive. Prompt patient. Response: Yes
Deep cough Sick over a month 8 See if rule 3, premise 2 is known, “The patient has a fever”
Deep cough Sick over a month 9 This is conclusion of rule 2. See if rule 2, premise 1 is known, “Then patients temperature is above 100”
Deep cough Sick over a month
10 This is a primitive. Prompt patient. Response: Yes. Fire Rule
Deep cough Sick over a month Fever 11 Rule 3 fires Deep cough Sick over a month Fever Infection
12 Rule 1 fires Deep cough Sick over a month Fever Infection Pneumonia
Figure : Linear Model for ES development
This phase involves the following steps
This is the most important stage in the development of ES. During this stage the knowledge engineer works with the domain expert to acquire, organize and analyze the domain knowledge for the ES. ‘Knowledge acquisition is the bottleneck in the construction of expert systems’ (Hayes-Roth et al.). The main steps in this phase are
Planning Knowledge Acquisition and Analysis
Work Pl
Knowledge Baseline
Knowledge Design Design Baseline
Code Knowledge Verification
System Encoding of knowledge Evaluation Using a developmenttool Formal in-house testing Product evaluation byusers
Tip: Limit the number of knowledge sources (experts) for simple domains to avoid scheduling and view conflicts. However, a single expert approach may only be applicable to restricted small domains. o Rank by importance o Rank by availability o Select expert/panel of experts o If more than one expert has to be consulted, consider a blackboard system, where more than one knowledge source (kept partitioned), interact through an interface called a Blackboard
Getting knowledge from the expert is called knowledge elicitation vs. the broader term knowledge acquisition. Elicitation methods may be broadly divided into:
Problems that may be faced and have to be overcome during elicitation include