Presentation on theme: "Expert Systems expert system (or knowledge-based system): a program which encapsulates knowledge from some domain, normally obtained from a human expert."— Presentation transcript:
1 Expert Systemsexpert system (or knowledge-based system): a program which encapsulates knowledge from some domain, normally obtained from a human expert in that domaincomponents:Knowledge base (KB): repository of rules, facts (productions)working memory: (if forward chaining used)inference engine: the deduction system used to infer results from user input and KBuser interface: interfaces with userexternal control + monitoring: access external databases, control aircraft rudders,...
2 Expert Systems Why use expert systems: commercial viability: whereas there may be only a few experts whose time is expensive and rare, you can have many expert systemsexpert systems can be used anywhere, anytimeexpert systems can have more knowledge than expertsexpert systems can explain their line of reasoningcommercially beneficial: the first commercial product of AIWeaknesses:expert systems are as sound as their KB; errors in rules mean errors in diagnosesautomatic error correction, learning is difficult (although machine learning research may change this)little common sense reasoning: “idiot savantes”
3 Steps in expert system building expert system building is a software engineering task, but with a twist: knowledge baseKB will be continually refined, corrected, updatedexpert system design & implementation steps1. initial proposal - identification of problem, expert(s), benefits2. create a prototype3. knowledge engineering: interview expert for many weeks (months)4. implement expert’s expertise in KB5. test expert system; go to 3 (let expert see results)6. put in production ; refine errors when found
4 Knowledge engineering Knowledge engineering: the extraction of knowledge from an expert, and encoding it into machine-inferrable formK.E. is the most difficult part of expert system implementationthe knowledge engineer must extract detailed info from an expert; but s/he is not expected to understand itthe expert relies on years of experience and intuition: asking them to deconstruct knowledge is difficult and frustratingcan also be political factorsmany strategies for knowledge engineeringmultiple KE’smultiple expertswatch expert in the fieldcontinual expert feedback on expert system performance
5 ExplanationRecall AND/OR trees: when you are asking why a particular action was performed at a node in the tree...how questions: recite the childrenwhy questions: recite the parentrepeated how or why: go down/up further in the treethus backward chaining expert systems naturally support explanationcan be done during inference: when user is asked for data, s/he can ask “why” and a reason is givenafter expert advice is given, user can ask “how”, “why”, and even “why not” (ie. why did some rule fail)a great tool for KB debugging!forward chaining: explanation not as structured; usually, rule ID’s are generated showing which rules fired; canned text possible too
6 Reactive systemsForward- and backward-chaining expert systems can be reactive: explicit actions can be carried out (in addition to, or instead of, ‘advice’ or diagnoses)most common reactions: add a new fact, delete an existing fact from working memorywith forward chaining: since assertions in working memory will fire rules, you may need to delete some in order to stop a rule from firing, and thus moving the deduction forwardone potential danger of forward-chaining systems: unstructured KB and inferencedump a load of rules and facts into KB, working memorylet the forward chaining execute until a solution obtainedbut this permits ad hoc expert system design
7 Probabilistic expert systems Expertise is often intuitive, and facts can have ‘degrees’ of truthmuch research has been devoted to inventing new models of probabilistic deduction: eg. Certainty factorsfuzzy logicstatistical / Bayesian deductionmulti-valued logics: true, false, unknowntypical rule: (eg). IF patient has a fever (CF 0.90)patient’s forehead is blue (CF .75)THEN illness is Cat Scratch Fever (CF .5)weakness: these certainty factors are not statistically sound values; rather “pulled out of the air” by expert or KECF’s are combined during deduction; multiple results can arisehow legitimate are they? “GIGO”
8 Other expert system paradigms 1. Neural nets & machine learningneural net: network of linked nodes; threshold functions fire nodesexamples of desired behaviour are obtained from expert, and converted to numeric vectors for a neural networkthe network is trained with an example set; output values are refined until network gives desired behaviourfinal system accepts general questions (converted to numeric values) and output reflects appropriate diagnosesrules can be extracted from neural net as wellstrengths:a ‘bottom-up’ approach to KB (vs. structured)perhaps human expertise is similarly acquired?weaknesses:what the heck is going on in the net???
9 Other expert systems paradigms 2. Inductive inference & machine learningrather than extract rules explicitly from expert, it’s easier to get table of example behaviours (like with neural nets)inductive inference: generalizes from finite example set to whole domainusing ideas from information theory, a refined decision tree (if-then-else) is derived from examplesstrengths:examples are intuitive (simplifies knowledge acquisition phase))can often find interesting patterns unknown by expertsgenerates ‘traditional’ rule-based KB’sweaknesses:example set must be representativenoise can be bad
10 Examples expert systems 1. Medical expert systemsmedical expert systems are an active areahumanitarian uses: remote areas can have world-class expertise, eg. a laptop and CD ROMmedical science is complex; expert systems are intelligent advisors and assistantsMYCIN - diagnoses bacterial blood infectionsuses certainty factors: ranked diagnoses are generatedEMYCIN: empty MYCIN - the “shell” of MYCIN for use in other applicationsCADUCEUS:expert system with entire internal medicine KB: huge!it’s been active since 1970’s
11 Example expert systems 2. XCONconfigures VAX systems from user requirementsDEC uses it; has increased throughput of system design10,000 rulessaid to have replaced X system designers with 4X expert system maintainers!3. DELTA/CATSdiesel electric locomotive trouble shooterproblem: system maintenance4. Jonathan’s Wavecommodities tradingincorporates several expert’s approachesruns in Prolog and Clots of AI groups on Wall Street!
12 Example expert systems 5. Codecheckexpert system to evaluate C source codecomplexity, formatting, standards and portability adherenceidentifies overly complex code (prime source of program problems!)6. CHORALexpert system for harmonizing chorales in the style of J.S. Bachsimilar system: harmonic analysis of tonal musicrules obtained from: studying composers music, musicologistssome systems used for composition (with interesting results)
13 The state of the art Expert systems are now ubiquitous still lots of active research:probabilistic knowledge and deductionlarge system maintenanceknowledge acquisitionpopular domainsindustrial, financial, medicallegal: interpret laws “by the book”education: intelligent tutoringSome domains remain difficult to implementthose requiring ‘artistic’ creativity and skillthose requiring common sense: the idiot savante syndrome