510 likes | 612 Views
Artificial Intelligence CIS 342. The College of Saint Rose David Goldschmidt, Ph.D. I, Robot by Isaac Asimov. What do we learn about robots? Can “see” as humans do (computer vision) Can walk and traverse around objects Use intuition; are skeptical Rely on reason
E N D
Artificial IntelligenceCIS 342 The College of Saint Rose David Goldschmidt, Ph.D.
I, Robot by Isaac Asimov • What do we learn about robots? • Can “see” as humans do (computer vision) • Can walk and traverse around objects • Use intuition; are skeptical • Rely on reason • Are able to explain reasoning • Are curious as to one’s own existence • Are introspective
I, Robot by Isaac Asimov • Is any of the AI in I, Robot realistic? • Computer vision • Robotics (boundary detection, learning) • Knowledge-based reasoning • Computer reasons and explains how aconclusion has been reached • Expert systems • Computer explains how a diagnosishas been determined
Expert Systems • An expert system performs at a human expert level in a narrow and specialized domain • Often a tradeoff between accuracy and speed • Use symbolic reasoning to solve problems • Symbols represent facts and rules (i.e. knowledge) • Symbols are usually human-readable as opposed to cryptic variable names, etc.
Expert Systems • Expert systems apply heuristics to guidethe reasoning process • This reduces the search space and time required toproduce one or more solutions • The goal is not always tosolve the problem exactly;often just to identifyone or more good solutions
Expert Systems • Expert systems provide explanation facilities to display reasoning (e.g. applied rules) to users • How did you come to that conclusion or diagnosis? • Expert systems make mistakes • So do human experts! • Users have to be awareof this possibility
Knowledge • Knowledge is a theoretical or practical understanding of a subject or a domain • Those who possess knowledge arecalled experts (or domain experts) • Experts have deep knowledge of facts, rules, heuristics, etc.
In-Class Exercise • Using your favorite programming language, create anexpert system to interactively ask users yes/no questions and diagnose one of the following health problems: • Cold and Flu • Headaches • Shoulder Problems • Tooth Problems • i.e. implement an expert system using charts fromhttp://familydoctor.org/symptom.xml
from Every Patient Tells a Story by Lisa Sanders, M.D. ISBN 0767922476 Medical Diagnostics • Attempts to build expert systems formedical diagnosis go back to the mid-1970s • Peter Szolovits (Professor of Computer Science at MIT) • Began his quest in 1976 (Caltech) • “We thought we could identify all of the best practices in medicine, create a system that would make diagnosis faster and easier, and bring it all to doctors via a computer.”
from Every Patient Tells a Story by Lisa Sanders, M.D. ISBN 0767922476 Medical Diagnostics “It’s simply not possible.” “The emphasis and attention has shifted towardbringing below-average doctors up to current standardsand helping even good doctors avoid doing really stupid things.That turns out to provide greater benefits to patients.”
from Every Patient Tells a Story by Lisa Sanders, M.D. ISBN 0767922476 DXplain • DXplain first launched in 1986 • Users enter clinical information, then ask DXplain to provide diagnostic decision support • DXplain knowledge base (KB) covers ~2400 diseasesand over 5000 clinical findings (signs, symptoms, epidemiologic data, laboratory findings, etc.) • Demo: http://dxplain.mgh.harvard.edu/dxp/dxp.sdemo.pl • Info: http://lcs.mgh.harvard.edu/projects/dxplain.html
from Every Patient Tells a Story by Lisa Sanders, M.D. ISBN 0767922476 GIDEON • Global Infectious Disease and Epidemiology Network • Online application that supports the diagnosis and treatment of infectious diseases • Organized by country of origin • Updated weekly! • Info: http://www.gideononline.com/
from Every Patient Tells a Story by Lisa Sanders, M.D. ISBN 0767922476 Isabel • Second-generation diagnostic supportsystem with improved user interface • Freeform text entry • Modern search techniquesfor text-based matching • Info: http://www.isabelhealthcare.com/home/
Facts and Rules • A fact may be thought of as a unit of knowledge • A rule enables an artificially intelligent system to derive new facts from existing facts • Rules typically take the form of IF-THEN statements • IF is the antecedent, premise, or condition • THEN is the consequent, conclusion, or action
Categories of Rules • Relation: IF the ‘fuel gauge’ is empty THEN the car is dead
Categories of Rules • Recommendation: IF the forecast is rain AND the sky is cloudy THEN the advice is ‘bring your umbrella’
Categories of Rules • Directive: IF the car is dead AND the ‘fuel gauge’ is empty THEN the action is ‘refuel the car’
Categories of Rules • Strategy: IF the car is dead THEN the action is ‘check the fuel gauge’; step 1 is complete IF step 1 is complete AND the car is dead THEN the action is ‘check the battery’; step 2 is complete
Categories of Rules • Heuristic: IF the spill is liquid AND the ‘spill pH’ < 6 AND the ‘spill smell’ is vinegar THEN the ‘spill material’ is ‘acetic acid’
Rule-Based Expert System • Newell and Simon, CMU (1970s)
Inference Engine • New facts are discovered by anexpert system’s inference engine • The process is called inference • New facts are inferred • Facts serve as data within the knowledge base • Rules (IF-THEN) describe how new data is inferred
Inference Engine • Inference engine algorithm: • Inference engine compares each rulewith facts it already “knows” about,matching the antecedent (IF condition) • When the antecedent matches one ormore known facts, the rule fires andits consequent (THEN) is executed
Inference Engine 1 4 2 3
Inference Chain • An inference chain indicates how an expert system applies rules to reach a conclusion given: A, B, D, E
Inference Chain • An inference chain indicates how an expert system applies rules to reach a conclusion given: A, B, D, E
Inference Chain • An inference chain indicates how an expert system applies rules to reach a conclusion given: A, B, D, E
Forward Chaining • Forward chaining applies rules to knowndata to achieve a desired goal • Also called data-driven reasoning • At each iteration, topmost rule is executed • When fired, a rule adds a new factto the database • This match-fire cycle stops when the goalhas been found or when no other rulescan be fired
Forward Chaining Examples • Facts: • Rules: • Use forward chaining to prove the following: • Prove: A B C D E Z A X Q T A Y A & D Q Q R R S N L T Z
SOLUTION Forward Chaining Examples • Facts: • Rules fired: • Use forward chaining to prove the following: A B C D E A B C D E X Y Q R S T Z A B C D E X A B C D E X Y A B C D E X Y Q A B C D E X Y Q R A B C D E X Y Q R S A B C D E X Y Q R S T • Proven: A X A Y A & D Q Q R R S Q T T Z Z
Forward Chaining Examples • Facts: • Rules: • Use forward chaining to prove the following: • Prove: A B C D E L A X Q T A Y A & D Q Q R R S N L T Z
SOLUTION Forward Chaining Examples • Facts: • Rules fired: • Use forward chaining to prove the following: A B C D E X Y Q R S T Z • Cannot prove: • No more rules left to fire A X A Y A & D Q Q R R S Q T T Z L
Forward Chaining • Using forward chaining, many rules may be executed unnecessarily • Search space is large and ever-expanding • Inefficiently fires rules that do not lead to desired goal • Therefore, often prefer to use backward chaining....
Backward Chaining • Backward chainingstarts with a desired goal,then searches for evidence to prove the goal • Desired goal often calledthe hypothetical solution • Backward chaining alsocalled goal-driven reasoning
Backward Chaining • Backward chaining algorithm: • At the first iteration, rule(s) with thedesired goal in the consequent are selected • Stack up and attain many subgoals until.... • If the antecedent matches known data,the rule is fired and the goal is proven • Otherwise, if no rules remain,the desired goal is not proven
Backward Chaining Examples • Facts: • Rules: • Use backward chaining to prove the following: • Prove: A B C D E Z A X Q T A Y A & D Q Q R R S N L T Z
SOLUTION Backward Chaining Examples • Facts: • Stack of rules: (subgoals) • Rules fired: • Use backward chaining to prove the following: A B C D E Q T Z A B C D E • Proven: A & D Q Q T T Z Z A & D Q Q T T Z
Backward Chaining Examples • Facts: • Rules: • Use backward chaining to prove the following: • Prove: A B C D E L A X Q T A Y A & D Q Q R R S N L T Z
SOLUTION Backward Chaining Examples • Facts: • Stack of rules: (subgoals) • Cannot prove: • Subgoal N cannot be proven • Use backward chaining to prove the following: A B C D E N L L