Download presentation
Presentation is loading. Please wait.
1
Expert Systems
2
http://www.exsys.com/demomain.html http://www.aiinc.ca/demos/whale.html http://www.aiinc.ca/demos/whale.html http://www.aiinc.ca/demos/whale.html http://www.myacquire.com/aiinc/stock/ http://www.myacquire.com/aiinc/stock/ http://www.myacquire.com/aiinc/stock/ http://www.myacquire.com/aiinc/spa/ http://www.myacquire.com/aiinc/pest/ http://www.lpa.co.uk/pws_exec/flx/webflex.exe?web flex=yield http://www.lpa.co.uk/pws_exec/flx/webflex.exe?web flex=yield http://www.youtube.com/watch?v=pqlSO_GlmeQ http://easydiagnosis.com/
3
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….
4
Resources Handout on e-reserve from AI illuminated, pages 46-50, 75-78, 81-83, 144-152, 267-284 http://en.wikipedia.org/wiki/Expert_system http://www.cs.usfca.edu/www.AlanTuring.net/turing_archiv e/pages/Reference%20Articles/what_is_AI/What%20is%2 0AI07.html
5
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
6
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.
7
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
8
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.
9
Big View Knowledge Base Inference Engine User what to think about how to think
10
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 – –http://www.youtube.com/watch?v=pqlSO_Gl meQhttp://www.youtube.com/watch?v=pqlSO_Gl meQ –example [FROM CS Illuminated]...
11
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
12
Example rule in knowledge base (from MYCIN - bacterial infections - 1972) 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.
13
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
14
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 ?)
15
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
16
Truth Table for Implies A B A B A B A B TTT TFF F T? FF? Not the same as “causes” !!
17
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
18
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
19
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.
20
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 ppppcontrapositive p q, p q
21
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
22
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.
23
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
24
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
25
STEP 2: Deduce new facts B C 1. A B C 2. C D 3. B G 4. F G 5. A
26
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!
27
Lewis Carroll
28
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)
29
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.
30
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.
31
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
32
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 SSSS syndrome Q is likely.
33
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
34
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
35
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.”
36
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.