Expert Systems.

Slides:



Advertisements
Similar presentations
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Advertisements

Expert Systems Reasonable Reasoning An Ad Hoc approach.
CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
1 Rule Based Systems Introduction to Production System Architecture.
Expert Systems Reasonable Reasoning An Ad Hoc approach.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Reasoning Forward and Backward Chaining Andrew Diniz da Costa
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
Inferences The Reasoning Power of Expert Systems.
Rule Based Systems Michael J. Watts
Knowledge Representation I Suppose I tell you the following... The Duck-Bill Platypus and the Echidna are the only two mammals that lay eggs. Only birds.
Rule Based Systems Alford Academy Business Education and Computing
 Monty Python – Argument Clinic video  Monty Python Monty Python.
Chapter 11 Artificial Intelligence and Expert Systems.
1 Lecture 34 Introduction to Knowledge Representation & Expert Systems Overview  Lecture Objective  Introduction to Knowledge Representation  Knowledge.
1 Chapter 9 Rules and Expert Systems. 2 Chapter 9 Contents (1) l Rules for Knowledge Representation l Rule Based Production Systems l Forward Chaining.
Rules and Expert Systems
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
EXPERT SYSTEMS Part I.
Building Knowledge-Driven DSS and Mining Data
ES: Expert Systems n Knowledge Base (facts, rules) n Inference Engine (software) n User Interface.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Artificial Intelligence CSC 361
Artificial Intelligence Reasoning. Reasoning is the process of deriving logical conclusions from given facts. Durkin defines reasoning as ‘the process.
1 Backward-Chaining Rule-Based Systems Elnaz Nouri December 2007.
RESEARCH IN EDUCATION Chapter I. Explanations about the Universe Power of the gods Religious authority Challenge to religious dogma Metacognition: Thinking.
I NTRO TO L OGIC Dr Shlomo Hershkop March
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Intro to Discrete Structures
Artificial Intelligence Lecture No. 15 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Production Systems A production system is –a set of rules (if-then or condition-action statements) –working memory the current state of the problem solving,
Artificial Intelligence
School of Computer Science and Technology, Tianjin University
Knowledge based Humans use heuristics a great deal in their problem solving. Of course, if the heuristic does fail, it is necessary for the problem solver.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Logical Agents Logic Propositional Logic Summary
Chapter 13 Artificial Intelligence and Expert Systems.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Course Instructor: K ashif I hsan 1. Chapter # 3 Kashif Ihsan, Lecturer CS, MIHE2.
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
DEDUCTIVE VS. INDUCTIVE REASONING. Problem Solving Logic – The science of correct reasoning. Reasoning – The drawing of inferences or conclusions from.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Inferencing in rule-based systems: forward and backward chaining.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
It’s All About Logic! Building Mathematics Understanding into Career & Technical Education.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Deductive and Inductive Reasoning
1 Chapter 13 Artificial Intelligence and Expert Systems.
Propositional and predicate logic
Artificial Intelligence: Applications
EXPERT SYSTEMS BY MEHWISH MANZER (63) MEER SADAF NAEEM (58) DUR-E-MALIKA (55)
By Muhammad Safdar MCS [E-Section].  There are times in life when you are faced with challenging decisions to make. You have rules to follow and general.
Chapter 2 Section 1 Conducting Research Obj: List and explain the steps scientists follow in conducting scientific research.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 4- Logic.
Chapter 7. Propositional and Predicate Logic
Introduction Characteristics Advantages Limitations
Introduction to Prolog
Introduction to Expert Systems Bai Xiao
Intro to Expert Systems Paula Matuszek CSC 8750, Fall, 2004
DEDUCTIVE vs. INDUCTIVE REASONING
CS201: Data Structures and Discrete Mathematics I
Chapter 7. Propositional and Predicate Logic
Artificial Intelligence in Medicine
Logical and Rule-Based Reasoning Part I
CS201: Data Structures and Discrete Mathematics I
Artificial Intelligence
Habib Ullah qamar Mscs(se)
Presentation transcript:

Expert Systems

flex=yield flex=yield

Expert Systems Solves problems or gives advice within a specialized area of knowledge. Solves problems or gives advice within a specialized area of knowledge. A good system can match the performance of a human specialist; in wide commercial use. A good system can match the performance of a human specialist; in wide commercial use. Uses include: medical diagnosis, chemical analysis, credit authorization, financial management, corporate planning, automobile design and manufacture, camera lens design, computer installation design, airline scheduling, cargo placement, and on and on…. Uses include: medical diagnosis, chemical analysis, credit authorization, financial management, corporate planning, automobile design and manufacture, camera lens design, computer installation design, airline scheduling, cargo placement, and on and on….

Resources Handout on e-reserve from AI illuminated, pages 46-50, 75-78, 81-83, , e/pages/Reference%20Articles/what_is_AI/What%20is%2 0AI07.html

Inductive reasoning (machine learning) Inductive reasoning (machine learning) –make generalizations based on observed patterns (“the sun will come up tomorrow”) –generalizations are “guesses”, not guaranteed Reasoning

Reasoning Deductive reasoning ( Logical Inference ) Deductive reasoning ( Logical Inference ) –use rules of logic to conclude new facts based on existing knowledge “all men are mortal; socrates is a man; thus socrates is mortal”. If the first two statements are true, the conclusion must be true.

Expert Systems “Common sense” hard to program - just so broad. “Deep Knowledge” / Expert System / Fact-Rich easier to program if the domain is limited. Hundreds of applications: medical, science, business, … One of great success stories of AI

Procedural Knowledge A decision diagram is a kind of expert system Easy to implement this logic in a computer program Human knowledge not typically “stored” in this way but instead as a collection of facts and relationships.

Big View Knowledge Base Inference Engine User what to think about how to think

Knowledge Base stores facts about a domain stores facts about a domain often in form of “if-then” rules often in form of “if-then” rules – – meQhttp:// meQ –example [FROM CS Illuminated]...

LAST: the last date a lawn treatment was applied CURRENT: the current date SEASON: the current season IF (CURRENT - LAST < 30) THEN NONE IF (SEASON = winter) THEN not BUGS IF (BARE) then TURF IF (SPARSE and not WEEDS) THEN FEED IF (BUGS and not SPARSE) THEN BUG IF (WEEDS and not SPARSE) THEN WEED IF (WEEDS and SPARSE) THEN WEEDFEED NONE: apply no treatment at this time TURF: apply a turf-building treatment WEED: apply a weed-killing treatment BUG: apply a bug-killing treatment FEED: apply a basic fertilizer treatment WEEDFEED:apply a combination of WEED & FEED

Example rule in knowledge base (from MYCIN - bacterial infections ) If the site of the culture is blood, and the stain of the organism is gramneg, and the morphology of the organism is rod, and the patient has been seriously burned, then there is evidence (.4) that the identity of the organism is pseudomonas. Thousands of rules possible Thousands of rules possible Knowledge Engineer works in concert with domain expert to extract useful rules. Knowledge Engineer works in concert with domain expert to extract useful rules.

Inference Engine Abstract rules of logic showing what deductions can be made. Abstract rules of logic showing what deductions can be made. Crash course: propositional logic Represent propositions as variables r: “It is raining” T or F c: “It is cloudy” T or F s: “Santa has 4 wheels” T or F

Compound propositions Operators: AND (  ), OR (  ), IMPLIES (  ), NOT (  ) AND (  ), OR (  ), IMPLIES (  ), NOT (  ) r  c: It is raining and it is cloudy (T/F ?) r  c: It is raining or it is cloudy (T/F ?)  s: Santa does not have 4 wheels (T/F ?) c  r: If it is cloudy, then it is raining (T/F ?) r  c: If it is raining, then it is cloudy (T/F ?)

Truth tables AND (  ), OR (  ), NOT (  ) A B A  B A  B  A A B A  B A  B  A TTT T F TFF T F F TF T T FFF F T

Truth Table for Implies A B A  B A B A  B TTT TFF F T? FF? Not the same as “causes” !!

Example Translation 1. If symptom P is present, then syndrome Q is likely. 2. Either P is present, or diagnosis R is correct. 3. The patient has symptom S if R is correct. 4. The patient does not have symptom S. 1. P  Q 2. P  R 3. R  S 4.  S Translation into logic statements

Different? Example 1. If Pat was involved, then Quinn was too. 2. Pat or Ralph did it. 3. If Ralph did it, then so did Sam. 4. Sam has a good alibi. 1. P  Q 2. P  R 3. R  S 4.  S Translation into logic statements

Value of abstraction Symbols can represent anything Symbols can represent anything We can encode our knowledge symbolically, and all that matters is the structure of the rules, not the original meaning. We can encode our knowledge symbolically, and all that matters is the structure of the rules, not the original meaning. The same rules of logic will apply regardless of what knowledge the symbols represented. The same rules of logic will apply regardless of what knowledge the symbols represented.

Example deduction rules If you know Then you can conclude p, p  q q forward chaining p  q p p p  q p  q, q  r p  r resolution p  q,  q ppppcontrapositive p  q,  p q

Example Deduction 1. If symptom P is present, then syndrome Q is likely. 2. Either P is present, or diagnosis R is correct. 3. The patient has symptom S if R is correct. 4. The patient does not have symptom S. 1. P  Q 2. P  R 3. R  S 4.  S Translation into logic statements

1. P  Q 2. P  R 3. R  S 4.  S stmt 3, 4, contrapositive, gives: 5.  R stmt 2, 5 implies 6. P stmts 6, 1 implies 7. Q Therefore, syndrome Q is likely.

Example Deduction: “whodunnit” 1. If Pat was involved, then Quinn was too. 2. Pat or Ralph did it. 3. If Ralph did it, then so did Sam. 4. Sam has a good alibi. 1. P  Q 2. P  R 3. R  S 4.  S Translation into logic statements

1.If the apples are tasty then the burgers or the chips are delicious. 2.If the chips are delicious, then so are the dogs. 3.If the burgers are delicious, then the grapes are sweet. 4.The french fries are warm and the grapes are sour. 5.The apples are tasty. Q: How good are the hot dogs ?? Challenge Problem STEP 1: translate into formulas  B  C 1. A  B  C 2. C  D 3. B  G 4. F   G 5. A

STEP 2: Deduce new facts  B  C 1. A  B  C 2. C  D 3. B  G 4. F   G 5. A

STEP 2: Deduce new facts  B  C 1. A  B  C 2. C  D 3. B  G 4. F   G 5. A  G From 4., we know  G From 3., we now know  B From 1. and 5., B  C From 1. and 5., we know B  C From two above facts, we know C From 2., we now know D So the hot dogs are delicious!

Lewis Carroll

Inference Engine Two methods Two methods –forward chaining (you’ve just seen it)  start with known facts  look for left sides of implications that are met, and conclude the right side.  repeat –backward chaining (example to follow)  goal to conclude some goal “fact” G  find implication rule with right side G  adopt as subgoals those items on left side  repeat  (sometimes can be working on many goals at once)

RULES (from KB) 1. A  B  C 2. A  D 3. C  D  E 4. B  E  F  H 5. A  E  G FACTS (from user): A, B, F GOAL: G FORWARD CHAINING (a) Facts A, B, and rule (1) gives C (b) Fact A, rule (2) gives D (c) (a), (b), and (3) gives E (d) Fact A, (c), rule (5) gives G THUS, G is true.

RULES (from KB) 1. A  B  C 2. A  D 3. C  D  E 4. B  E  F  H 5. A  E  G FACTS (from user): A, B, F GOAL: G BACKWARD CHAINING (a) Goal G (b) By (5), subgoals: A, E (c) Subgoal A met (FACT) (d) By (3), subgoals C, D (e) By (2), subgoal D met (f) By (1), subgoals A, B (g) A, B met (FACTS) THUS, G is true.

the process INFERENCE ENGINE chaining with logical rules USER SUPPLIED FACTSDOMAIN KNOWLEDGE MORE FACTS CONCLUSIONS Main task in building an expert system system may request more facts from user

INFERENCE ENGINE chaining with logical rules USER SUPPLIED FACTSDOMAIN KNOWLEDGE MORE FACTS CONCLUSIONS system may request more facts from user 1. P  Q 2. P  R 3. R  S SSSS syndrome Q is likely.

INFERENCE ENGINE chaining with logical rules USER SUPPLIED FACTSDOMAIN KNOWLEDGE MORE FACTS CONCLUSIONS system may request more facts from user New expert system obtained by changing knowledge base new facts new conclusions

Algorithm for Logical Inference? Input: Facts, rules, + G Input: Facts, rules, + G Keep applying rules of inference. Keep applying rules of inference. Stop when we get to G Stop when we get to G Does this terminate? Does this terminate? –Try every possible inference over and over  may not halt –Which problem does this remind you of? How to best do inference: Research area How to best do inference: Research area

Explainable results Nice feature of expert systems is that typically they can explain the reasons for their answers to human users: “G is true because A and B were found to be true.” “A is true because C and D are true.”

Summary Expert systems solve specialized problems Expert systems solve specialized problems Knowledge is obtained from a human expert, and encoded symbolically in a knowledge base Knowledge is obtained from a human expert, and encoded symbolically in a knowledge base Additional facts are obtained from the user Additional facts are obtained from the user Rules of logic crank away and obtain new facts, until… Rules of logic crank away and obtain new facts, until… A deduction can be made A deduction can be made