Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 20. Recap The main components of an ES are –Knowledge Base (LTM) –Working Memory (STM) –Inference Engine (Reasoning)

Similar presentations


Presentation on theme: "Lecture 20. Recap The main components of an ES are –Knowledge Base (LTM) –Working Memory (STM) –Inference Engine (Reasoning)"— Presentation transcript:

1 Lecture 20

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

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

4 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?

5 Explanation 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) How?

6 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.

7 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.)

8 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

9 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.

10 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

11 Inference Strategies Forward Chaining Backward Chaining

12 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.

13 Doctor Example Rules –Rule 1 IFThe patient has deep cough AND We suspect an infection THENThe patient has Pneumonia –Rule 2 IFThe 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 THENWe suspect an infection

14 Doctor example Case facts: –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.

15 Doctor Example First Pass Temp= 103 Sick for a month Coughing fits Unknown1, 2 Suspect infection Temp= 103 Sick for a month Coughing fits Patient has fever True, fire rule2, 1 Temperature>100 Temp= 103 Sick for a month Coughing fits True1, 1 Deep cough Working MemoryStatusRule, premise

16 Doctor Example Second Pass Temp= 103 Sick for a month Coughing fits Patient has fever True3, 1 Sick for over fortnight Temp= 103 Sick for a month Coughing fits Patient has fever Infection True, fire3, 2 Patient has fever Temp= 103 Sick for a month Coughing fits Patient has fever Unknown1, 2 Suspect infection Temp= 103 Sick for a month Coughing fits Patient has fever True1, 1 Deep cough Working MemoryStatusRule, premise

17 Doctor Example Third Pass Temp= 103 Sick for a month Coughing fits Patient has fever Infection Pneumonia True, fire1, 2 Suspect infection Temp= 103 Sick for a month Coughing fits Patient has fever Infection True1, 1 Deep cough Working MemoryStatusRule, premise Now no more facts can be added to the WM. Diagnosis: Patient has Pneumonia

18 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

19 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 –IF you are bored AND you have a credit card THEN go watch a movie


Download ppt "Lecture 20. Recap The main components of an ES are –Knowledge Base (LTM) –Working Memory (STM) –Inference Engine (Reasoning)"

Similar presentations


Ads by Google