Presentation is loading. Please wait.

Presentation is loading. Please wait.

B. Ombuki Cosc 3P71 1 Expert System: A quick introductory overview reference material: R & N (1 st Edition): pages 217 –223 Some material adapted from.

Similar presentations


Presentation on theme: "B. Ombuki Cosc 3P71 1 Expert System: A quick introductory overview reference material: R & N (1 st Edition): pages 217 –223 Some material adapted from."— Presentation transcript:

1 B. Ombuki Cosc 3P71 1 Expert System: A quick introductory overview reference material: R & N (1 st Edition): pages 217 –223 Some material adapted from COSC 4F79 Expert Systems

2 B. Ombuki Cosc 3P71 2 Expert Systems expert system (or knowledge-based system): a program which encapsulates knowledge from some domain, normally obtained from a human expert in that domain components: –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 KB –user interface: interfaces with user –external control + monitoring: access external databases, control,...

3 B. Ombuki Cosc 3P71 3 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 systems –expert systems can be used anywhere, anytime –expert systems can ‘have more’ knowledge than experts –expert systems can explain their line of reasoning –commercially beneficial: the first commercial product of AI Weaknesses: –expert systems are as sound as their KB; errors in rules mean errors in diagnoses –automatic error correction, learning is difficult (although machine learning research may change this) –little common sense reasoning: “idiot savantes”

4 B. Ombuki Cosc 3P71 4 Steps in expert system building expert system building is a software engineering task, but with a twist: knowledge base –KB will be continually refined, corrected, updated expert system design & implementation steps 1. initial proposal - identification of problem, expert(s), benefits 2. create a prototype 3. knowledge engineering: interview expert for many weeks (months) 4. implement expert’s expertise in KB 5. test expert system; go to 3 (let expert see results) 6. put in production ; refine errors when found

5 B. Ombuki Cosc 3P71 5 KB Process of building a knowledge base is called knowledge engineering A knowledge engineer is someone who investigates a particular domain, determines what concepts are important in that domain, and creates a formal representation of the objects and relations in the domain. knowledge engineer is normally trained in representation and not the Problem domain e.g., circuit design, space station mission scheduling e.g., but he/will become educated about the domain by interviewing the real experts (a process called knowledge acquisition).

6 B. Ombuki Cosc 3P71 6 Knowledge engineering Knowledge engineering: the extraction of knowledge from an expert, and encoding it into machine-inferrable form K.E. is the most difficult part of expert system implementation –the knowledge engineer must extract detailed info. from an expert; but s/he is not expected to understand it –the expert relies on years of experience and intuition: asking them to deconstruct knowledge is difficult and frustrating –can also be political factors many strategies for knowledge engineering –multiple KE’s –multiple experts –watch expert in the field –continual expert feedback on expert system performance

7 B. Ombuki Cosc 3P71 7 Knowledge Engineering Vs Programming Knowledge Engineering Choosing a logic Building a knowledge base Implementing the proof theory Inferring new facts Programming Choosing a programming language Writing a program Choosing or writing a compiler Running a Program programming: the output is derived from the input and the program. KB: answers are derived from descriptions of problems and the KB. both cases: one writes down a description of a problem or state of affairs, and then uses the definition of the language to derive new consequences. Given the similarities, what is the point of doing “knowledge engineering”, why not just admit that the final result will be a program, and set about to write that program from start, using a traditional programming language?

8 B. Ombuki Cosc 3P71 8 Knowledge engineering Main advantage of knowledge engineering is that it requires less commitment, thus less work. A knowledge engineer only has to decide what objects and relations are worth representing, and which relations hold among the objects. A programmer has to do all that and, in addition must decide how to compute the relations between objects, given some initial input. The knowledge engineer specifies what is true, and the inference procedure figures out how to turn the facts into a solution for a given problem. Because a fact is true regardless of the task to be done, KB can be reused easily without modification Debugging is easier in a KB

9 B. Ombuki Cosc 3P71 9 Expert Systems Mostly developed using specialized software tools called shells. The shells are equipped with –some inference mechanism (either backward chaining, forward chaining, or both) –Knowledge is entered according to a specified format Shell Has several other other features, like –tools for writing hypertext –tools for developing user interfaces –tools for manipulating lists, strings, and objects –tools for interfacing with external programs and databases. Shells can be classified as languages, albeit with a narrower range of application compared to most programming languages.

10 B. Ombuki Cosc 3P71 10 Explanation AND/OR trees: when you are asking why a particular action was performed at a node in the tree... –how questions: recite the children –why questions: recite the parent –repeated how or why: go down/up further in the tree thus backward chaining expert systems naturally support explanation –can be done during inference: when user asked for data, s/he can ask “why” and a reason is given –after expert advice given, user can ask “how”, “why”, and even “why not” (i.e., 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

11 B. Ombuki Cosc 3P71 11 Reaction systems Forward- 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 memory –with 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 forward one potential danger of forward-chaining systems: unstructured KB and inference –dump a load of rules and facts into KB, working memory –let the forward chaining execute until a solution obtained –but this permits ad hoc expert system design

12 B. Ombuki Cosc 3P71 12 Probabilistic expert systems Expertise is often intuitive, and facts can have ‘degrees’ of truth much research has been devoted to inventing new models of probabilistic deduction: e.g. Certainty factors –fuzzy logic –statistical / Bayesian deduction –multi-valued logics: true, false, unknown typical rule: (e.g). 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 KE –CF’s are combined during deduction; multiple results can arise –how legitimate are they?

13 B. Ombuki Cosc 3P71 13 Other expert system paradigms 1. Neural nets & machine learning –neural net: network of linked nodes; threshold functions fire nodes –examples of desired behaviour are obtained from expert, and converted to numeric vectors for a neural network –the network is trained with an example set; output values are refined until network gives desired behaviour –final system accepts general questions (converted to numeric values) and output reflects appropriate diagnoses –rules can be extracted from neural net as well –strengths: a ‘bottom-up’ approach to KB (vs. structured) perhaps human expertise is similarly acquired? – weaknesses: what in the world is going on in the net???

14 B. Ombuki Cosc 3P71 14 Other paradigms: inference 2. Inductive inference & machine learning –rather 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 domain –using ideas from information theory, a refined decision tree (if-then- else) is derived from examples –strengths: examples are intuitive (simplifies knowledge acquisition phase)) can often find interesting patterns unknown by experts generates ‘traditional’ rule-based KB’s –weaknesses: example set must be representative noise can be bad

15 B. Ombuki Cosc 3P71 15 Other paradigms: induction How does one build a decision tree? Is it practical to search for the smallest decision tree? Finding the smallest decision tree is an NP-Hard problem. note: not guaranteed to find the minimal tree (that’s NP- complete); but will usually find small-ish trees References: Lecture slides on Learning R & N: Chapter 18

16 B. Ombuki Cosc 3P71 16 Examples: expert systems 1. Medical expert systems –medical expert systems are an active area humanitarian uses: remote areas can have world-class expertise, e.g. a laptop and CD ROM medical science is complex; expert systems are intelligent advisors and assistants – MYCIN diagnose bacterial infections of the blood uses certainty factors: ranked diagnoses are generated EMYCIN: empty MYCIN - the “shell” of MYCIN for use in other applications –CADUCEUS: expert system with entire internal medicine KB: huge! it’s been active since 1970’s

17 B. Ombuki Cosc 3P71 17 Example: expert systems 2. GASOIL expert system (R &N (1 st.ed): p. 539) deployed by BP for designing gas oil separation systems for offshore oil platforms-----uses 2500 rules 3. XCON : well-known rule-based deduction system –configures VAX systems from user requirements –DEC (Digital Equipment corporation) uses it; has increased throughput of system design –nearly 10,000 rules –said to have replaced X system designers with 4X expert system maintainers! 4. DELTA/CATS –diesel electric locomotive trouble shooter –problem: system maintenance 5. Jonathan’s Wave –commodities trading –incorporates several expert’s approaches –runs in Prolog and C –lots of AI groups on Wall Street!

18 B. Ombuki Cosc 3P71 18 Example: expert systems 6. Codecheck –expert system to evaluate C source code –complexity, formatting, standards and portability adherence –identifies overly complex code (prime source of program problems!) 7. CHORAL –expert system for harmonizing chorales in the style of J.S. Bach –similar system: harmonic analysis of tonal music –rules obtained from: studying composers music, musicologists –some systems used for composition (with interesting results)

19 B. Ombuki Cosc 3P71 19 Examples expert systems Music domain knowledge... AI creativity demonstrated by an expert system composing music PC (AI) magazine: July/August 2001 - W. Pirkle illustrates a rule-based system that utilizes chaos to create art, in the form of music.

20 B. Ombuki Cosc 3P71 20 The state of the art Expert systems are now ubiquitous still lots of active research: –probabilistic knowledge and deduction –large system maintenance –knowledge acquisition popular domains –industrial, financial, medical – legal: interpret laws “by the book” –education: intelligent tutoring Some domains remain difficult to implement –those requiring ‘artistic’ creativity and skill –those requiring common sense: the idiot savante syndrome


Download ppt "B. Ombuki Cosc 3P71 1 Expert System: A quick introductory overview reference material: R & N (1 st Edition): pages 217 –223 Some material adapted from."

Similar presentations


Ads by Google