1.43k likes | 1.7k Views
Second Generation Expert Systems (motto: “knowledge is power”). Dr. Zoltán ISTENES ELTE - TTK (University Eötvös Loránd, Budapest, Hungary) Department of General Computer Science istenes@inf.elte.hu. Presentation: I’am….
E N D
Second Generation Expert Systems(motto: “knowledge is power”) Dr. Zoltán ISTENES ELTE - TTK(University Eötvös Loránd,Budapest, Hungary) Department of General Computer Science istenes@inf.elte.hu
Presentation: I’am… • PhD thesis (1997, Nantes, France): “ZoLa a reflexive language to represent and to operationalise conceptual models of reasoning” • first assistant at the ELTE (teaching: introduction to programming, computer architectures, lisp language, robotics, developing second generation expert systems, artificial intelligence) • interests: reasoning mechanisms, reflexivity (+ travelling) • I expect: not to give a research presentation, but to give ideas, to discuss and show the possibilities (+ to visit Linz) Istenes Zoltán - Second Generation Expert Systems
Presentation: You are… • Who are you? • What are your motivations? • What do you know about Expert Systems? • What do you want to know about Expert Systems? • Any questions? Istenes Zoltán - Second Generation Expert Systems
Topics • How the expert “knowledge transfer” approach became a “model constructing” approach? • The use of explicit and implicit knowledge • The difference between the symbol level and the knowledge level • The gap between the informal and the formal representation • The “model” • what model to construct, • how to construct the model, • how to operationalise the model, • how to build the prototype ? • Advantages of the reflexivity… Istenes Zoltán - Second Generation Expert Systems
Objectives • How the computer programs, systems have “evolved” • Why is it important and useful to use knowledge • Problem solving methods, mechanisms... • Artificial Intelligence / Expert Systems are not “magic” • Knowledge based systems are “easy” to… • “And yes, You can write an Expert System!” Istenes Zoltán - Second Generation Expert Systems
Main ideas • use more and more explicit knowledge • Modelling – language - knowledge level - operationalisation - prototyping • reflexivity is necessary Istenes Zoltán - Second Generation Expert Systems
Plan of the week… • Introduction, the “knowledge”, traditional computer programs • I. Gen. Expert Systems… • ...and their limits • II. Gen. Expert Systems… • …and their limits • reflexivity Istenes Zoltán - Second Generation Expert Systems
I would like to discuss about • history, origins, developments, importance, notions, applications, examples, bibliography, www, questions, • Information: http://www.inf.elte.hu/~istenes/linz2001/ Istenes Zoltán - Second Generation Expert Systems
Plan of the 1. Day • “knowledge” (expert systems versus traditional programs) • expert systems, knowledge based systems • first generation (classical) expert systems • expert system shells • applications • examples Istenes Zoltán - Second Generation Expert Systems
Problems, computer, resolution, algorithm, AI • to resolve a problem, we need knowledge • how is the knowledge “represented” • Reading: http://www.inf.elte.hu/~istenes/linz2001/From_Socrates_to_Expert_Systems.html Istenes Zoltán - Second Generation Expert Systems
“Knowledge!”“What is knowledge?” signs knowledge data information syntax semantics pragmatics Istenes Zoltán - Second Generation Expert Systems
What is the difference between information and knowledge? • information: data + meaning • knowledge is an “answer”: “All knowledge is an answer to a question” (what, when, how, where, why?) • knowledge is “pragmatic”: “related to the action” • knowledge is context related (problems of different contexts) Istenes Zoltán - Second Generation Expert Systems
Example of knowledge • example: • information on the WEB -> knowledge ? • example: • 5 • temperature is 5°C • today the temperature is 5°C • “toady it’s cold, I will take a pullover” present in the mind action used Istenes Zoltán - Second Generation Expert Systems
Required characteristics of knowledge • “formalisable”: representation in a computer system • explicit • exact • complete • etc. Istenes Zoltán - Second Generation Expert Systems
“Is there any knowledge in computer programs? Where?” • traditional programs: programmer “knows” how to get to the solution -> algorithm • the problem solving knowledge is coded in the algorithm Istenes Zoltán - Second Generation Expert Systems
Data Base Systems • data base systems (queries) : what we are searching for (where is it, how is it, it’s properties) and not how to get it. Istenes Zoltán - Second Generation Expert Systems
I. generation (Classical)Expert Systems Knowledge base Inference engine Reasoning mechanism Knowledge representation Knowledge acquisition
“What is an Expert System?” • Collection of the expertise of a human expert, in a computer system, used to resolve the same problems the expert can. • “An expert simulator” • “A symbol manipulator program” Istenes Zoltán - Second Generation Expert Systems
“What is the difference between Expert System and Knowledge Based System?” • expert system: • Underline the importance of a human expert • old, good sounding name • not an “expert level” • knowledge based system: • Underline the importance of the “knowledge” • different types of knowledge Istenes Zoltán - Second Generation Expert Systems
Knowledge base + inference engine • put knowledge into the system: “knowledge base” • use a mechanism to exploit this knowledge: “inference engine” Istenes Zoltán - Second Generation Expert Systems
“How to construct an Expert System?” Knowledgeacquisition • get an expert of the domain and“retrieve” his knowledge... • “put” this knowledge in a computer... • “use” an inference engine to exploit this knowledge... • ...use the computer toresolve the problem as the expert does... representation Inference mechanisms Istenes Zoltán - Second Generation Expert Systems
Knowledge acquisition • the domain expert • interviews • co-operation, motivation… • “knowledge engineer” • verification of the represented knowledge • One Expert or an Expert team? Istenes Zoltán - Second Generation Expert Systems
Knowledge representation • We want to put the knowledge into a computer system: representation, formalism • “What to represent, how to represent?” • domain objects, relations, rules • level of the formalism K n o w l e d g e Istenes Zoltán - Second Generation Expert Systems
Formalisms • rule, fact, … • frame: hierarchy, • semantic network: “is a” • object - attribute – value • „Hybrid“ • Example : Production rule formalism for the domain knowledge representation • fact base: set of facts • goal : set of facts • rule base: set of production rules: IF <fact>* THEN <fact>* Istenes Zoltán - Second Generation Expert Systems
“Inference engines”“How does it work?” • the inference engine uses the knowledge base to make inference steps to resolve the problem... • forward chaining – “data driven“ • backward chaining – “goal driven“ • mixed chaining, etc. Istenes Zoltán - Second Generation Expert Systems
The forward chaining mechanism • starting from the facts, • using the rules we get some more internal statements (facts), • then other statements, • until we reach the goal. Istenes Zoltán - Second Generation Expert Systems
The backward chaining mechanism • using the rules from the goal we get some more internal “subgoals”, • to prove the subgoals, we get other subgoals • until we can prove them with the facts. • Example of backward chaining mechanism: Prolog - Flex Istenes Zoltán - Second Generation Expert Systems
Logic used in the Expert Systems • 0 order: no variables • If raining and no_umbrella Then get_wet • 1 order: predicate with variables • “Socrates is a men. All men are mortal.” • fact (men() is a predicate): men(Socrates) • rule ($X is a variable): IF men($X) THEN mortal($X) • 2 order logic: variable predicates Istenes Zoltán - Second Generation Expert Systems
Expert System Shells What is it? What is (can be) provided by a shell? Why to use it? Examples… What is it? What is (can be) provided by a shell? Why to use it? Examples…
What is an expert system shell? • inference engine for a specific formalism • A “higher“ level language to manipulate the knowledge Istenes Zoltán - Second Generation Expert Systems
What is provided by a shell? • inference engine • tools for: • knowledge acquisition • explanation • verification, incoherence, etc. • When, why is it useful to use a shell? • fast, easy development, test for a prototype Istenes Zoltán - Second Generation Expert Systems
Shell examples / applications • Clips: • rule based, forward chaining • http://www.ghgcorp.com/clips/CLIPS.html • Flex: • Prolog language, Hybrid • Flops • forward chaining • M1: • rule based, backward chaining • certainty factor, Meta rules, “unknown”, “why?”, “show” • Many others… Istenes Zoltán - Second Generation Expert Systems
Explanation • why <do you ask this question>? • how <did you get this result>? • why not <an other result>? • what if <an other answer>? Istenes Zoltán - Second Generation Expert Systems
Tudásbázis teszt esetek “kódolása” “kódolása” file: (szövegszerk.-vel) (sz.szerk.-vel) file: Knowledgeengineer- file: end-user TB CACHE INSERT system ADD, REMOVE SET RESETKB LOAD <file> TRACE SAVE LOAD CACHE LOG MAKE CACHE következmények következ- beírása tetésnél Inference engine workspace Knowledgebase- “CACHE” szabály- keresés ill. tény- következtetés elõtt illesztés válasz, kérdés, magyarázatkérés, magyarázat, QUIT, EXIT parancs javaslat ABORT SHOW LIST, USES SET, RESET user- DOS M1 The M.1 shell architecture Istenes Zoltán - Second Generation Expert Systems
Example of M1 rules rule-7: if main-component = poultry and has-turkey = no then best-color = white cf 90 and best-color = red cf 30. rule-8: if main-component = fish then best-color = white. Istenes Zoltán - Second Generation Expert Systems
Example of a CLIPS rule (defrule determine-point-surface-state "" (or (and (working-state engine does-not-start) (spark-state engine irregular-spark)) (symptom engine low-output)) (not (repair ?)) => (bind ?response (ask-question "What is the surface state of the points (normal/burned/contaminated)? " normal burned contaminated)) (if (eq ?response burned) then (assert (repair "Replace the points.")) else (if (eq ?response contaminated) then (assert (repair "Clean the points."))))) Istenes Zoltán - Second Generation Expert Systems
The MYCIN family tree Expert system Expert system shell Tutorial system NEOMYCIN HERACLES GUIDON2 MYCIN EMYCIN GUIDON Istenes Zoltán - Second Generation Expert Systems
Applications of the expert systems • diagnostic • classification • planning • monitoring • etc. Istenes Zoltán - Second Generation Expert Systems
Other information sources • Expert system FAQ; http://www.cs.cmu.edu/Web/Groups/AI/html/faqs/ai/expert/part1/faq.html • Java Expert System Shell „Jess is a rule engine and scripting environment written entirely in Sun's Java language“: http://herzberg.ca.sandia.gov/jess/ Istenes Zoltán - Second Generation Expert Systems
Example applications • Whale watcher: http://www.aiinc.ca/demos/whale.html • Graduate Admissions Application Form: http://www.aiinc.ca/demos/grad.html Istenes Zoltán - Second Generation Expert Systems
Meta knowledge • knowledge about knowledge • knowledge about how to use knowledge... • special cases, priorities, etc. Istenes Zoltán - Second Generation Expert Systems
Problems, inconveniences, • knowledge base incompleteness, incoherence • too many rules: example : 500 rule OK, 5000 rule ??? • Explication (explanation): chain of used rules? • MYCIN -> NEOMYCIN • Hierarchy is coded in the rules • implicitly coded control knowledge • explicit coded control knowledge • “how exactly?” • “but why…” • “deeper knowledge” • Lack of the common sense • Lack of the intuition (“feelings, sentiments”) Istenes Zoltán - Second Generation Expert Systems
“What is explicit, what is implicit?” Istenes Zoltán - Second Generation Expert Systems
“But where is theknowledge about how to resolve the problem?” Istenes Zoltán - Second Generation Expert Systems
Conclusions of the 1. Day • “When is it good to use an Expert System, and when is it not?” • “How to do better?” • free discussion Istenes Zoltán - Second Generation Expert Systems
2.Day Conceptual model Modelling methodologies Modelling languages
Plan of the 2. day • General context: construction the conceptual model of a knowledge based system • Specific context: construction of a conceptual model of reasoning, constrained by a target solving behaviour • Modelling, conceptual model • Modelling approaches • Modelling languages Istenes Zoltán - Second Generation Expert Systems
General context Construction the conceptual model of a knowledge based system • A knowledge based system (KBS) is a system witch manipulate knowledge represented explicitly. • A knowledge acquisition process is necessary for the construction of a KBS. • In the first KBS the knowledge acquisition is a simple transcription of the expert knowledge into a formalisme - production rules... Istenes Zoltán - Second Generation Expert Systems
Knowledge acquisition is a modellisation 4 steps [Aussenac-Gilles]: • data driven acquisition • construction of the conceptual model • instantiation of the conceptual model with the expert knowledge (model driven acquisition) • operationalisation of the conceptual model Istenes Zoltán - Second Generation Expert Systems