Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 18.

Similar presentations


Presentation on theme: "Lecture 18."— Presentation transcript:

1 Lecture 18

2 Recap Knowledge Representation Reasoning
Semantic networks, Facts, Rules, Logic: propositional and predicate logic Reasoning Deductive (logical), inductive (generalization), Abductive (approx backward e.g. carry umbrella), heuristic, monotonic Rules of inference: Modus Ponens, Modus Tolens, And-elimination, And-introduction Resolution Refutation

3 Course Outline Advanced Introduction Expert Systems Topics Problem
Solving Algorithms KRR Expert Systems Uncertainty Learning Planning Advanced Topics Conclusion Change the animation on this slide…!

4 History and Evolution Expert Systems at the forefront of AI rebirth.
Realization in the late 60 that the general framework of problem solving was not enough to solve all kinds of problem. GPS separates knowledge from control 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. Importance of expert systems as the earliest AI systems and the most used systems practically.

5 History and Evolution One of the pioneering systems: DENDRAL (1960’s)
developed at Stanford for NASA Chemical analysis of Martian soil for space mission Given mass spectral data, determine molecular structure. In the laboratory, generate and test method used: various possible hypothesis (molecular structures) are generated and tested (matched to data) Early realization that experts use certain heuristics to rule out certain options. Encode that knowledge in the system Moral: ‘Intelligent behavior is dependent, not so much on the methods of reasoning, but on the knowledge one has to reason with’ Durkin

6 History and Evolution MYCIN( mid 70s)
Developed at Stanford to aid physicians in diagnosing and treating patients with a particular blood disease. Motivation for MYCIN Few experts, availability constraints Immediate expertise often needed, life-threatening condition Tested in diagnosis on ten selected cases, along with a panel of human experts. Scored higher than human experts Importance: Demonstrated that expert systems could be used for solving practical problems Pioneering work on the structure of ES (separate knowledge and control), as opposed to Denderal, Mycin used the same structure that is now formalized for ESs.

7 History and Evolution R1/XCON (late 70s) one of the most cited ES.
Developed by DEC( Digital Equipment Corporation) Computer configuration assistant One of the most successful expert systems in routine use. Estimated saving is $25million per year Example of how ES can increase productivity of organization, by assisting existing experts

8 What is an Expert? What characterizes an ‘Expert’
Specialized knowledge in a certain area Experience in the given area Explanation of decisions A skill set that enables the expert to translate the specilized knowledge gained through experience into solutions. e.g. Skin specialist, heart specialist, car mechanic, architect, software designer. Discuss how each of these human experts develops into an expert. e.g. a doctor Gains some formal education Observations through experience Forms a set of distinctions on how to link facts to produce solutions

9 What is an expert system?
“A computer program designed to model the problem solving ability of a human expert” Durkin Aspects of the human expert that we wish to model Knowledge Reasoning Extending the idea of a human expert to an expert system….Link the aspects of the expert to the framework we developed in KRR. All of the concept we learnt there will apply here and will be used to build practical systems.

10 Comparison of a Human Expert and an Expert System
Example: medical ES modelling a doctor, discuss each of the following issues in that context. The ES outperforms the ‘average’ doctor and is available in regions where people may not have access to any medical care at all otherwise.

11 Comparison Issues Human Expert Expert System Availability Limited
Always Geographic location Locally available Anywhere Safety considerations Irreplaceable Can be replaced Durability Depends on individual Non-perishable Performance Variable High Speed Cost Low Learning Ability Variable/High Explanation Exact

12 Replacement of Expert Raises many eyebrows!
Not very practical in some situations, but feasible in others Consider drastic situations, e.g. where safety or location is an issue, e.g. a mission to Mars. Oil Exploration Company France based oil exploration company maintains a number of oil wells. Problem: drills become stuck. This typically occurs when the drill hits something that prevents the drill from turning. Often delays due to this cause huge losses (order of 100, 000 $ per day) until n expert can arrive at the scene to investigate. Solution: deploy an expert system. A system called ‘Drilling Advisor’ (Elf-Aquitane 1983) developed. What roles can an expert system play? France based Oil exploration company maintains a number of oil wells. Problem: drills become stuck. This typically occurs when the drill hits something that prevents the drill from turning. Often delays due to this cause huge losses (order of 100, 000 $ per day) until n expert can arrive at the scene to investigate. Solution: deploy an expert system. Cooker Expert (Herrod and Smith 1986) developed to capture the expertise of an employee who would soon retire.

13 Assisting an Expert Most commonly found application
Aiding expert in routine task to increase productivity Aiding in managing complex situations (May draw on experience of other individuals) Solves by recalling problems XCON Lending Advisor Most commonly found application

14 How are Expert Systems Used?
Diagnosis Interpretation Prescription Design Planning Control Instruction Prediction Simulation In order of decreasing use. Include a one line description

15 Control Applications Adaptively govern/regulate the behavior of a system E.g. controlling a manufacturing process, or medical treatment Obtain data about current system state, reason and predict future state, recommend/execute adjustments Example: VM VM (Fagan 1978) monitors patients a patient in an intensive care unit and controls the patients treatments. The system characterizes the patients state from sensory data, identifies any alarms, and suggests useful therapies. The system measures the patients heart ra,e blood pressure and the state of operation of a mechanical ventilator that assists the patients breathing. Working with this information coupled with information ino the medical history of the patient, the system makes the needed adjustments to the ventilator

16 Design Configure objects under given constraints. e.g. XCON
Often use non-monotonic reasoning, because of implications of steps on previous steps. Eg. PEACE (Dincbas 1980) CAD tool to assist in design of electronic structures.

17 Diagnosis and Prescription
Identify system malfunction points. Have knowledge of possible faults as well as diagnosis methodology extracted from technical experts E.g. diagnosing patients syptoms. Malfunctioning electronic structures Most diagnosis ES have a prescription subsystem. Such system are usually interactive, building on user information to narrow down diagnosis.

18 Instruction and Simulation
Guide the instruction of a student in some topic. Tutoring applications Example: GUIDON( Clancey 1979) Instructs students in diagnosis of bacterial infections Strategy: presents user with case (of which it has solution), analyzes the students response. It compares the students approach to its own and directs student based on differences. Simulation Model a process or system for operational study. May be used along with tutoring applications

19 Interpretation ‘Produces an understanding of situation from given information’ Durkin Example FXAA (1988) provides financial assistance for a commercial bank. Looks at thousands of transactions and identifies irregularities. Automated audit.

20 Planning and Prediction
E.g. recommending steps for a robot to carry out certain steps Cash management planning SMARTPlan is a strategic market planning expert (Beeral, 1993). Suggests appropriate marketing mix required to achieve economic success. Predictions systems infer likely consequences from a given situation. Reason with time ordered information

21 Appropriate Domains for Expert Systems
Can the problem be effectively solved by conventional programming? Suited to ill-structured problems Is the domain well-bounded? e.g. a headache diagnosis system may eventually have to have domain knowledge of many areas of medicine, not easy to limit diagnosis to one conventional area. Practical Issues Is some human expert willing to cooperate? Is the experts knowledge especially uncertain and heuristic? if so, ES may be useful

22 Lecture Summary Historical Perspective Human Expert vs. Expert System
Why Expert Systems? Increase Availability Reduce Cost Permanence Expertise drawn from multiple sources Reliability Fast Response Steady and consistent Explanation facility How are expert systems used Examples of expert systems: SMARTPlan, R1/XCON, MYCIN After looking at all these case studies of actual expert systems, we recap on the advantages of ES in the context of those examples

23 Recap Human Expert vs. Expert System Why Expert Systems?
Increase Availability Reduce Cost Permanence Expertise drawn from multiple sources Reliability Fast Response Steady and consistent Explanation facility How are expert systems used (replace, assist) Examples of expert systems: SMARTPlan, R1/XCON, MYCIN

24 Application Areas Medicine (MYCIN) Manufacturing Business (SMARTPlan)
Engineering (R1/XCON) PEACE, CAD tool to assist in design of electronic structures. Agriculture Education (GUIDON) In order of deceasing percentage of use Statistics. examples

25 Expert System Structure
Lets look at how an expert (say a doctor) solves a problem: Focused area of expertise Specialized Knowledge (Long-term Memory, LTM) Case facts (Short-term Memory, STM) Reasons with these to form new knowledge Solves the given problem Lets define the corresponding concepts in an Expert System. Recall: We said that an expert is an individual with specialized knowledge in a certain area. In expert system terminology ,we shall call this ‘area’ the Domain and this knowledge, Domain Knowledge diagram

26 Expert System Structure
Conclusions Solution Inference Engine Reasoning Case/Inferred Facts(stored in Working Memory) Case Facts (stored in STM) Domain Knowledge (stored in Knowledge Base) Specialized Knowledge (stored in LTM) Domain Focused Area of Expertise Expert System Human Expert Now, the above table by analogy to human expert’s components, introduces the components of an expert system

27 Expert System Structure
USER Working Memory Analogy: STM Initial Case facts Inferred facts Knowledge Base Analogy: LTM - Domain Knowedge Inference Engine

28 Knowledge Base Part of the expert system that contains the domain knowledge Problem facts, Rules Concepts Relationships One of the roles of the expert system designer is to act as a knowledge engineer. Knowledge acquisition bottleneck You have 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, one way of encoding that knowledge is in the form of IF-THEN rules. We saw that such representation is especially conducive to reasoning. Looking at each component in slightly more detail

29 Working Memory ‘Part of the expert system that contains the problem facts that are discovered during the session’ Durkin A session is one consultation. During a consultation: User presents some facts about the situation. These are stored in the working memory. Using these and the knowledge in the knowledge base, new information is inferred and also added to the working memory.

30 Inference Engine 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 The inference engine works with the knowledge base and the working memory, and draws on both to add new facts to the working memory. If our knowledge is represented in the form of IF-THEN rules, the Inference Engine has the following mechanism 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.

31 Expert System Example: Family
Knowledge Base Rule 1: IF father (X, Y) AND father (X, Z) THEN brother (Y, Z) Rule 2: 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) Add another example Lets illustrate the above components using a very simple example Rule 1: If X is Y’s father AND X is Z’s father then, Y and Z are brothers Rule 2: If X is Y’s father, then X pays Y’s tuition fee Rule 3: If X and Y are brothers, they like each other. Now Session: User asserts the following facts: M. Tariq is Ali’s father M. Tariq is Ahmeds’s father The inference engine matches the premises of the rules in the knowledge base to the facts in the working memory, if premises match, the rule is ‘fired’ i.e. it conclusion is added to the working memory

32 Expert System Example: Raining
Knowledge Base Rule 1: IF person(X) AND person(Y) AND likes (X, Y) AND sameSchool(X,Y) THEN friends(X, Y) Rule 2: IF friends (X, Y) AND weekend() goToMovies(X) goToMovies(Y) Rule 3: IF goToMovies(X) AND cloudy() carryUmbrella(X) Working Memory person (Ali) person (Ahmed) cloudy () likes(Ali, Ahmed) sameSchool(Ali, Ahmed) weekend() friends(Ali, Ahmed) goToMovies(Ali) goToMovies(Ahmed) carryUmbrella(Ali) carryUmbrella(Ahmed)

33 Recap The main components of an ES are Knowledge Base (LTM)
Working Memory (STM) Inference Engine (Reasoning)

34 Lecture Summary Explanation Facility Characteristics of Expert Systems
Inference Mechanisms Forward Chaining Backward Chaining

35 Explanation Facility Module of an expert system, that allows transparency of operation, by providing the an explanation of how it reached the conclusion. In the above example, how does the expert system draw the conclusion that Ali likes Ahmed?

36 Explanation Knowledge Base Rule 1: IF father (X, Y) AND father (X, Z)
THEN brother (Y, Z) Rule 2: 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) An explanation facility will trace out this line of reasoning for the user to see. How?

37 Characteristics of an Expert System
Separates Knowledge From Control Knowledge Base, Working Memory and Inference Engine Comparison to traditional programs that mix a program’s knowledge and control. Separation allows changes to the knowledge to be independent of changes in control and vice versa. Now that we have some idea of the components of an ES and how they interact, let us see based on this the characteristics of an ES. Separates Knowledge From Control Duda says: ”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”

38 Characteristics of an Expert System
Possesses Expert Knowledge Embodies expertise of human expert Focuses Expertise The larger the domain, the more complex the expert system becomes E.g. Car Diagnosis Expert (more easily handled if we make separate ES components for engine problems, electricity problems, etc.)

39 Characteristics of an Expert System
Reasons with Symbols (KR) Reasons Heuristically Permits Inexact Reasoning Is Limited to Solvable Problems Thrives on Reasonable Complexity Makes Mistakes

40 Programming vs Knowledge Engineering
Conventional Programming Sequential, three step process: Design, Code, Debug Knowledge Engineering The process of building an expert system Assessment, knowledge acquisition, design, testing, documentation and maintainace. Major differences Conventional programming focuses on solution ES programming focuses on problem. 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.

41 People Involved in an Expert System Project
Domain Expert ‘A person who posses the skill and knowledge to solve a specific problem in a manner superior to others’ Durkin For out purposes, an expert should have: Expert Knowledge in the given domain Good Communication Skills Availability Readiness to co-operate Knowledge Engineer ‘A person who designs, builds and tests an Expert System’ Durkin Plays key role. Identifies, acquires and encodes knowledge. End-user

42 Inference Strategies Forward Chaining Backward Chaining

43 Forward Chaining How does a doctor go about diagnosing a patient.
Asks for symptoms Infers diagnosis from symptoms Data-driven approach Forward Chaining: “Inference strategy that begins with a set of known facts, derives new facts using rules whose premises match the known facts, and continues this process until a goal sate is reached or until no further rules have premises that match the known or derived facts. This approach is similar to modus ponens.

44 Doctor Example 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

45 Doctor example Case facts: Approach Patients temperature= 103
Patient has been sick for over a month Patient has violent coughing fits Approach Add facts to working memory (WM) Take each rule in turn and check to see if any of its premises match the facts in the WM When matches found for all premises of a rule, place the conclusion of the rule in WM. Repeat this process till no more facts can be added.

46 Doctor Example First Pass
Temp= 103 Sick for a month Coughing fits Unknown 1, 2 Suspect infection Patient has fever True, fire rule 2, 1 Temperature>100 True 1, 1 Deep cough Working Memory Status Rule, premise 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

47 Doctor Example Second Pass
Rule, premise Status Working Memory 1, 1 Deep cough True Temp= 103 Sick for a month Coughing fits Patient has fever Temp= 103 Sick for a month Coughing fits Patient has fever 1, 2 Suspect infection Unknown 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

48 Doctor Example Third Pass
Temp= 103 Sick for a month Coughing fits Patient has fever Infection Pneumonia True, fire 1, 2 Suspect infection True 1, 1 Deep cough Working Memory Status Rule, premise Change graphical format Now no more facts can be added to the WM. Diagnosis: Patient has Pneumonia

49 Issues The forward chaining inference engine infers all possible facts from the given facts Has no way of distinguishing between important and unimportant facts. Therefore, equal time spent on trivial evidence as well as crucial facts e.g. Rule 4: IF The patient has fever THEN The patient cannot go out IF the patient cannot go out THEN the patient should stay home and read a book Has no significance from the doctors perspective!

50 Conflict Resolution When happens when the premises of two rules match the given fact. Which should be fired? If we fire both, they may add conflicting facts. E.g IF you are bored AND you have no cash THEN go to a friend’s place AND you have a credit card THEN go watch a movie Add an example that shows how such a conflict could change the operation. IF you are bored THEN go to a friends place AND you are grounded THEN do not go to a friends place


Download ppt "Lecture 18."

Similar presentations


Ads by Google