Expert Systems  and Artificial Intelligence Modified from Marakas 2003 Reading: Chapter 7 “ the expert is the one who has made the most mistakes in the domain of interest”
The Concept of Expertise Expertise:  extensive knowledge in a narrow field Gained by making mistakes Arrive at solutions through logic Logic establishes the True/Falsity of assertions IF-THEN to arrive at conclusions Derive new information from existing to arrive at conclusions Deductions and inference are used to establish how well facts “fit” a scenario Experts use this “information fit” to arrive at their decisions
Example of “information fit” Known information John is Sam’s son John is the eldest child Mary is Sam’s daughter John and Mary’s mother is called Anna Sam has been married to Anna for 50 years Derived information If John is Sam’s son, THEN John must be a boy If Sam and Anna have been married for 50 years, THEN John and Mary are their children by either birth or adoption
Expert Sytems & Artificial Intelligence Expert systems:  a computer application that employs a set of rules based on human knowledge to solve problems that require human expertise Imitates reasoning of experts on “information fit” A non-expert simulates a dialog with an expert to solve complex problems Artificial Intelligence:  practical mechanisms that enable computers to simulate the human reasoning process Interface of compute science/cognitive psychology “ the study of how to make computers do things which humans do better” – the Turing Test?
The Intelligence of Artificial Intelligence How do people reason? (the realm of cog. psych.) Categorization Can reason at levels of abstraction  Rules derived from relationships among categories Specific Rules Heuristics Less rigorous rules of thumb Past Experience Use a similar scenario to model new one (benefit of 20/20 hindsight) Expectations Frequency, pattern recognition So can computers simulate these processes of reasoning? car bike personal Motor bike commercial Land transport bus taxi
How Do Computers Reason? Rule-based reasoning:  IF-THEN statements  represent knowledge encoded as rules If TRUE rule is “instantiated”, otherwise ignored Pattern recognition:  detecting sounds, shapes or long sequences Analogous to “Expectation”, similar conditions Frames:  Object-oriented approach of creating hierarchical data structures analogous to “categorisation” – databasey!! Case-based reasoning:  adapting previous solutions to a current problem
Types of IF……… Then Inferential If  premise  THEN  conclusion If snowing THEN drive with caution Procedural If  situation  THEN  action If Average grade =A THEN award 1 st  class degree Declarative If  Antecedent  THEN  consequent If student has mitigating circumstances THEN award ‘incomplete’ grade
The CBR Cycle
Other Forms of AI Machine learning  – neural networks and genetic algorithms (“learning” mechanisms) Automatic programming  – mechanisms that generate a program to do a specific task (allows non-programmers to “program”) User describes inputs and generates a program Artificial life  – attempts to recreate biological phenomena within computer-based systems As opposed to dissecting frogs! Transfer to design of engineering projects (software, spacecraft, robotics etc)
Neural Network Train it? – supervised Or just let it get on with it? - unsupervised
Genetic Algorithm mutation crossover Used in scheduling (timetabling?), design, marketing
The Concept and Structure of Expert Systems Basic structure of an ES follows the generic structure of a DSS User interface, Knowledge base, inference engine The knowledge base is specific to a particular problem domain associated with the ES The main difference between an ES and DSS is that the ES contains knowledge acquired from experts in the application domain
Common Expert System Architecture User Knowledge Engineer User Interface Inference Engine Knowledge Base User Environment KE Tool Kit KE Interface Development Environment Organization Systems Interface
The User Interface in an ES Design of the UI focuses on human concerns such as ease of use, reliability and reduction of fatigue Critical to its success Balance with storage capacity / hardware constraints Design should allow for a variety of methods of interaction (input, control and query) UI should allow for a variety of interactive mechanisms: touch screen, keypad, light pens, voice command, hot keys
The Knowledge Base – the “Brains” Contains the domain-specific knowledge acquired from the domain experts Can consist of object descriptions, problem-solving behaviors, constraints, heuristics and uncertainties The success of an ES relies on the completeness and accuracy of its knowledge base Distinguish a database (data facts) from a knowledge base (experts’ rules, cases, etc)
The Inference Engine – “the brawn”! Here, the knowledge is put to use to produce solutions The engine is capable of performing deduction or inference based on rules or facts Also capable of using inexact or fuzzy reasoning based on probability or pattern matching Cycle consists of: Match rules with given facts Select the rule that is to be executed Execute the rule by adding the deduced fact to the working memory
Chaining Simple methods used by most inference engines to produce a line of reasoning Two methods are possible depending on the direction of reasoning Forward chaining: the engine begins with the initial content of the workspace and proceeds toward a final conclusion Backward chaining: the engine starts with a goal and finds knowledge to support that goal
Forward Chaining Example Suppose we have three rules: R1: If A and B then D R2: If B then C R3: If C and D then E If facts A and B are present, we infer D from R1 and infer C from R2.  With D and C inferred, we now infer E from R3.
Backward Chaining Example The same three rules: R1: If A and B then D R2: If B then C R3: If C and D then E If E is known, then R3 implies C and D are true.  R2 thus implies B is true (from C) and R1 implies A and B are true (from D).
Real Chaining Example Which method to choose? Backward or forward? Situation You wish to fly from Warsaw to Glasgow but all direct flights are full Backward chain Check which cities flights arriving in Glasgow are from and keep going backwards Forward chaining Check destinations from Warsaw and then check their destinations until you find a flight going to Glasgow
Expert Systems Shells Expert System Shells: generic systems that contain reasoning mechanisms but not the problem-specific knowledge Early shells were cumbersome but still allowed the user to avoid having to completely program the system from scratch Modern shells contain two primary modules: a rule set builder (to construct the initial knowledge base) and an inference engine (as the vehicle for arriving at conclusions)
Building an Expert System An early step is to identify the type of tasks  Interpretation, predicting likely consequences Diagnosis of faults, monitoring expected outcomes User guidance Key awareness is to recognise opportunities E.g. to replace scarce expert resources Provide an expert assistant To free up experts onto other tasks Look for activities where experts are: Overburdened Undersupplied Expensive Unavailable Candidates Diagnosis, prediction, control, evaluation, prescription of solution
Pre-design Activities Another important step is choosing the experts who will contribute knowledge Involved throughout the development Not be threatened, rather enhanced Development team should have a functional understanding of the knowledge domain Unlike more general information systems design projects, the software tools and hardware platform are selected very early
Benefits of Expert Systems Increased timeliness in decision making ES available on a 24 hour service Increased productivity of experts By taking some of the lesser important decisions Replication at many sites Improved consistency in decisions Eliminates cognitive bias/limitation, memory loss Improved understanding and explanation Improved management of uncertainty Fuzzy logic – e.g. how tall is tall? Formalization of knowledge within organisation And little amnesia! – knowledge is codified.
Limitations Associated With ES’s How do you code common sense? expertise is difficult to extract and encode. Expert “errors” transferred to model Another is that human experts adapt naturally but an ES must be recoded. human experts better recognize when a problem is outside the knowledge domain, but an ES may just keep working ES’s can’t eliminate the cognitive limitations of the user An ES is functional only in a narrow domain
Key Point Summary The Concept of Expertise Use of logic Methods of human reasoning Categorisation etc AI methods of mimicking human reasoning Case-based reasoning, pattern recognition etc ES architecture User interface, Knowledge base, inferencing Designing and building ES’s Benefits and problems with ES’s
Area of Research for Coursework Case Based Reasoning http://en.wikipedia.org/wiki/Case_based_reasoning Neural Networks http://www.cs.stir.ac.uk/~lss/NNIntro/InvSlides.html Genetic Algorithms ( http://cs.felk.cvut.cz/~xobitko/ga) Rule-based systems http://www.cee.hw.ac.uk/~alison/ai3notes/section2_4_4.html Pattern recognition http://cgm.cs.mcgill.ca/~godfried/teaching/pr-web.html Artificial life http://www.wisegeek.com/what-is-artificial-life.htm?referrer=adwords_campaign=artificiallife_ad=016171&_search_kw=what%20is%20artificial%20life Automatic programming http://www.cs.utexas.edu/users/novak/autop.html Fuzzy Logic http://www.seattlerobotics.org/encoder/mar98/fuz/flindex.html Data Mining – Adriaans and Zantinge (library) Google found these with “What is …….?” queries You might find better ones to get you going

Lecture5 Expert Systems And Artificial Intelligence

  • 1.
    Expert Systems and Artificial Intelligence Modified from Marakas 2003 Reading: Chapter 7 “ the expert is the one who has made the most mistakes in the domain of interest”
  • 2.
    The Concept ofExpertise Expertise: extensive knowledge in a narrow field Gained by making mistakes Arrive at solutions through logic Logic establishes the True/Falsity of assertions IF-THEN to arrive at conclusions Derive new information from existing to arrive at conclusions Deductions and inference are used to establish how well facts “fit” a scenario Experts use this “information fit” to arrive at their decisions
  • 3.
    Example of “informationfit” Known information John is Sam’s son John is the eldest child Mary is Sam’s daughter John and Mary’s mother is called Anna Sam has been married to Anna for 50 years Derived information If John is Sam’s son, THEN John must be a boy If Sam and Anna have been married for 50 years, THEN John and Mary are their children by either birth or adoption
  • 4.
    Expert Sytems &Artificial Intelligence Expert systems: a computer application that employs a set of rules based on human knowledge to solve problems that require human expertise Imitates reasoning of experts on “information fit” A non-expert simulates a dialog with an expert to solve complex problems Artificial Intelligence: practical mechanisms that enable computers to simulate the human reasoning process Interface of compute science/cognitive psychology “ the study of how to make computers do things which humans do better” – the Turing Test?
  • 5.
    The Intelligence ofArtificial Intelligence How do people reason? (the realm of cog. psych.) Categorization Can reason at levels of abstraction Rules derived from relationships among categories Specific Rules Heuristics Less rigorous rules of thumb Past Experience Use a similar scenario to model new one (benefit of 20/20 hindsight) Expectations Frequency, pattern recognition So can computers simulate these processes of reasoning? car bike personal Motor bike commercial Land transport bus taxi
  • 6.
    How Do ComputersReason? Rule-based reasoning: IF-THEN statements represent knowledge encoded as rules If TRUE rule is “instantiated”, otherwise ignored Pattern recognition: detecting sounds, shapes or long sequences Analogous to “Expectation”, similar conditions Frames: Object-oriented approach of creating hierarchical data structures analogous to “categorisation” – databasey!! Case-based reasoning: adapting previous solutions to a current problem
  • 7.
    Types of IF………Then Inferential If premise THEN conclusion If snowing THEN drive with caution Procedural If situation THEN action If Average grade =A THEN award 1 st class degree Declarative If Antecedent THEN consequent If student has mitigating circumstances THEN award ‘incomplete’ grade
  • 8.
  • 9.
    Other Forms ofAI Machine learning – neural networks and genetic algorithms (“learning” mechanisms) Automatic programming – mechanisms that generate a program to do a specific task (allows non-programmers to “program”) User describes inputs and generates a program Artificial life – attempts to recreate biological phenomena within computer-based systems As opposed to dissecting frogs! Transfer to design of engineering projects (software, spacecraft, robotics etc)
  • 10.
    Neural Network Trainit? – supervised Or just let it get on with it? - unsupervised
  • 11.
    Genetic Algorithm mutationcrossover Used in scheduling (timetabling?), design, marketing
  • 12.
    The Concept andStructure of Expert Systems Basic structure of an ES follows the generic structure of a DSS User interface, Knowledge base, inference engine The knowledge base is specific to a particular problem domain associated with the ES The main difference between an ES and DSS is that the ES contains knowledge acquired from experts in the application domain
  • 13.
    Common Expert SystemArchitecture User Knowledge Engineer User Interface Inference Engine Knowledge Base User Environment KE Tool Kit KE Interface Development Environment Organization Systems Interface
  • 14.
    The User Interfacein an ES Design of the UI focuses on human concerns such as ease of use, reliability and reduction of fatigue Critical to its success Balance with storage capacity / hardware constraints Design should allow for a variety of methods of interaction (input, control and query) UI should allow for a variety of interactive mechanisms: touch screen, keypad, light pens, voice command, hot keys
  • 15.
    The Knowledge Base– the “Brains” Contains the domain-specific knowledge acquired from the domain experts Can consist of object descriptions, problem-solving behaviors, constraints, heuristics and uncertainties The success of an ES relies on the completeness and accuracy of its knowledge base Distinguish a database (data facts) from a knowledge base (experts’ rules, cases, etc)
  • 16.
    The Inference Engine– “the brawn”! Here, the knowledge is put to use to produce solutions The engine is capable of performing deduction or inference based on rules or facts Also capable of using inexact or fuzzy reasoning based on probability or pattern matching Cycle consists of: Match rules with given facts Select the rule that is to be executed Execute the rule by adding the deduced fact to the working memory
  • 17.
    Chaining Simple methodsused by most inference engines to produce a line of reasoning Two methods are possible depending on the direction of reasoning Forward chaining: the engine begins with the initial content of the workspace and proceeds toward a final conclusion Backward chaining: the engine starts with a goal and finds knowledge to support that goal
  • 18.
    Forward Chaining ExampleSuppose we have three rules: R1: If A and B then D R2: If B then C R3: If C and D then E If facts A and B are present, we infer D from R1 and infer C from R2. With D and C inferred, we now infer E from R3.
  • 19.
    Backward Chaining ExampleThe same three rules: R1: If A and B then D R2: If B then C R3: If C and D then E If E is known, then R3 implies C and D are true. R2 thus implies B is true (from C) and R1 implies A and B are true (from D).
  • 20.
    Real Chaining ExampleWhich method to choose? Backward or forward? Situation You wish to fly from Warsaw to Glasgow but all direct flights are full Backward chain Check which cities flights arriving in Glasgow are from and keep going backwards Forward chaining Check destinations from Warsaw and then check their destinations until you find a flight going to Glasgow
  • 21.
    Expert Systems ShellsExpert System Shells: generic systems that contain reasoning mechanisms but not the problem-specific knowledge Early shells were cumbersome but still allowed the user to avoid having to completely program the system from scratch Modern shells contain two primary modules: a rule set builder (to construct the initial knowledge base) and an inference engine (as the vehicle for arriving at conclusions)
  • 22.
    Building an ExpertSystem An early step is to identify the type of tasks Interpretation, predicting likely consequences Diagnosis of faults, monitoring expected outcomes User guidance Key awareness is to recognise opportunities E.g. to replace scarce expert resources Provide an expert assistant To free up experts onto other tasks Look for activities where experts are: Overburdened Undersupplied Expensive Unavailable Candidates Diagnosis, prediction, control, evaluation, prescription of solution
  • 23.
    Pre-design Activities Anotherimportant step is choosing the experts who will contribute knowledge Involved throughout the development Not be threatened, rather enhanced Development team should have a functional understanding of the knowledge domain Unlike more general information systems design projects, the software tools and hardware platform are selected very early
  • 24.
    Benefits of ExpertSystems Increased timeliness in decision making ES available on a 24 hour service Increased productivity of experts By taking some of the lesser important decisions Replication at many sites Improved consistency in decisions Eliminates cognitive bias/limitation, memory loss Improved understanding and explanation Improved management of uncertainty Fuzzy logic – e.g. how tall is tall? Formalization of knowledge within organisation And little amnesia! – knowledge is codified.
  • 25.
    Limitations Associated WithES’s How do you code common sense? expertise is difficult to extract and encode. Expert “errors” transferred to model Another is that human experts adapt naturally but an ES must be recoded. human experts better recognize when a problem is outside the knowledge domain, but an ES may just keep working ES’s can’t eliminate the cognitive limitations of the user An ES is functional only in a narrow domain
  • 26.
    Key Point SummaryThe Concept of Expertise Use of logic Methods of human reasoning Categorisation etc AI methods of mimicking human reasoning Case-based reasoning, pattern recognition etc ES architecture User interface, Knowledge base, inferencing Designing and building ES’s Benefits and problems with ES’s
  • 27.
    Area of Researchfor Coursework Case Based Reasoning http://en.wikipedia.org/wiki/Case_based_reasoning Neural Networks http://www.cs.stir.ac.uk/~lss/NNIntro/InvSlides.html Genetic Algorithms ( http://cs.felk.cvut.cz/~xobitko/ga) Rule-based systems http://www.cee.hw.ac.uk/~alison/ai3notes/section2_4_4.html Pattern recognition http://cgm.cs.mcgill.ca/~godfried/teaching/pr-web.html Artificial life http://www.wisegeek.com/what-is-artificial-life.htm?referrer=adwords_campaign=artificiallife_ad=016171&_search_kw=what%20is%20artificial%20life Automatic programming http://www.cs.utexas.edu/users/novak/autop.html Fuzzy Logic http://www.seattlerobotics.org/encoder/mar98/fuz/flindex.html Data Mining – Adriaans and Zantinge (library) Google found these with “What is …….?” queries You might find better ones to get you going