180 likes | 375 Views
Chapter 09 Expert System. Xiu-jun GONG (Ph. D) School of Computer Science and Technology, Tianjin University gongxj@tju.edu.cn http:// cs.tju.edu.cn/faculties/gongxj/course/ai /. Outline. The definition and its framework Components: reasoning technology Steps for developing an ES quickly
E N D
Chapter 09 Expert System Xiu-jun GONG (Ph. D) School of Computer Science and Technology, Tianjin University gongxj@tju.edu.cn http://cs.tju.edu.cn/faculties/gongxj/course/ai/
Outline • The definition and its framework • Components: reasoning technology • Steps for developing an ES quickly • Successful scenarios of ESs • Pros & cons
The definition • An Expert System (a knowledge based system) • a computer program that contains some of the subject-specific knowledge, and contains the knowledge and analytical skills of one or more human experts. • Features: • ES provides expert quality advice, diagnosis or recommendations. • ES solves real problems which normally would require a human expert.
Framework of ES Knowledge Engineer Domain Expert User User Interface Interpreter Knowledge acquisition Dynamic database Reasoning machine Knowledge base ES Core
Components of ES (1) • Knowledge base: store special knowledge from domain experts. • Reasoning machine: inferences from domain knowledge and user’s evidence, draws a conclusion. It consists of reasoning strategies and control sets. • Knowledge acquisition : the transformation of knowledge from the forms in which it is available in the world into forms that can be used by a knowledge system
Components of ES (2) • Interpreter: Justify ‘why’ a question was asked and ‘how’ it reached some conclusion. • Dynamic database: • All info about the current problem. • All conclusion that the system has been able to derive • User interface: interact with application developer, domain expert, and knowledge engineer.
Reasoning technology • Deduction • Abduction • Induction • Inference in rule-based systems
Inference in rule-based systems (1) • Domain knowledge is represented as IF-THEN rules • Data are facts about the current situation.
Inference in rule-based systems (2) • Inference chains • Forward Chaining (Data – Driven) • for analysis and interpretation. • Backward Chaining (Goal – Driven) • for diagnosis
Forward Chaining (Data – Driven) • Reasoning starts from data and proceeds forward with that data • Each time only the top most rule is executed. • When fired, the rule adds a new fact in the database. • Any rule can be executed only once • The match-fire cycle stops when no further rule can be fired
Backward Chaining (Goal – Driven) • The ES has the goal (a hypothetical solution) and the inference engine attempts to prove it. • Find rules that might have the desired solution in the THEN parts • Subgoal(s) might be needed in proving the IF parts • Search rules that can prove the subgoal • The process repeats.
How to develop an ES (1) • ES vs problem-solving system • ES = knowledge + reasoning • program = data structure + algorithm • The difference is the way domain know is encoded in between. • Two basic steps: • Extracting the relevant knowledge from the human expert by a knowledge engineer. • S/he then develops the knowledge base of the ES
How to develop an ES (2) • Knowledge acquisition generally involve interviewing the expert • An ES should be • easily inspected and modified • able to explain its reasoning • Tools for building an ES • Program language:LISP,PROLOG,C++ • General ES tool: OPS, UNITS, RLL,ROSIE • ES Shell: EMYCIN, KAS, EXPERT, InterModeller
LISP • The name LISP derives from "LISt Processing" • Components • Linked lists are one of Lisp languages' major data structures • Lisp source code is itself made up of lists • All program code is written as s-expressions, or parenthesized lists • Two well-known dialects: • Common Lisp->CLISP: http://clisp.cons.org/ • Scheme-R6RS->Ikarus: http://ikarus-scheme.org/
Prolog • Features: • The program logic is expressed in terms of relations, represented as facts and rules • A computation is initiated by running a query over these relations • Standards: ISO Prolog: http://pauillac.inria.fr/~deransar/prolog/docs.html • The precise nature of unification • The precise semantics of the language; • Implementations • GNU Prolog: http://www.gprolog.org/ • SWI-Prolog: http://www.swi-prolog.org
Successful scenarios of ESs • Dendral - analyse mass spectra • Dipmeter Advisor - analysis of data gathered during oil exploration • Mycin - diagnose infectious blood diseases and recommend antibiotics (by Stanford University) • CADUCEUS (expert system) - blood-borne infectious bacteria • NEXPERT Object - An early general-purpose commercial backwards-chaining inference engine used in the development of Expert Systems • SHINE Real-time Expert System - Spacecraft Health INference Engine • Informavores Firefly - Browser based expert systems environment built using flow charts and used in the development of Expert Systems
Pros & Cons (1) • Pros: • Provide consistent answers for repetitive decisions, processes and tasks • Hold and maintain significant levels of information • Reduces creating entry barriers to competitors • Review transactions that human experts may overlook
Pros & Cons (2) • Cons • The lack of human common sense needed in some decision makings • The creative responses human experts can respond to in unusual circumstances • Domain experts not always being able to explain their logic and reasoning • The challenges of automating complex processes • The lack of flexibility and ability to adapt to changing environments as questions are standard and cannot be changed • Not being able to recognize when no answer is available