Introduction to Knowledge-based Systems

Slides:



Advertisements
Similar presentations
Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
Advertisements

Chapter 1: Introduction to Expert Systems
CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
Reasoning Forward and Backward Chaining Andrew Diniz da Costa
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
Intelligent systems Lecture 6 Rules, Semantic nets.
Rule Based Systems Michael J. Watts
Chapter 12: Expert Systems Design Examples
Introduction to Expert Systems
Chapter 1: Introduction to Expert Systems
1 Chapter 9 Rules and Expert Systems. 2 Chapter 9 Contents (1) l Rules for Knowledge Representation l Rule Based Production Systems l Forward Chaining.
Rules and Expert Systems
© C. Kemke1Reasoning - Introduction COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
Chapter 3: Methods of Inference
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
EXPERT SYSTEMS Part I.
Chapter 1: Introduction to Expert Systems
Chapter 1: Introduction to Expert Systems
Chapter 1: Introduction to Expert Systems
Chapter 3: Methods of Inference Expert Systems: Principles and Programming, Fourth Edition.
Artificial Intelligence CSC 361
Chapter 2: The Representation of Knowledge
Sepandar Sepehr McMaster University November 2008
Artificial Intelligence Lecture No. 15 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Knowledge Acquisition. Concepts of Knowledge Engineering Knowledge engineering The engineering discipline in which knowledge is integrated into computer.
Introduction to Expert Systems. 2 Objectives Learn the meaning of an expert system Understand the problem domain and knowledge domain Learn the advantages.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Chapter 3: Methods of Inference
13: Inference Techniques
Methods of Inference. 2 Objectives Learn the definitions of trees, lattices, and graphs Learn about state and problem spaces Learn about AND-OR trees.
 Knowledge Acquisition  Machine Learning. The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Chapter 1: Introduction to Expert Systems Expert Systems: Principles and Programming, Fourth Edition.
Chapter 1: Introduction to Expert Systems Expert Systems: Principles and Programming, Fourth Edition Original by Course Technology Modified by Ramin Halavati.
 Predicate: A sentence that contains a finite number of variables and becomes a statement when values are substituted for the variables. ◦ Domain: the.
School of Computer Science and Technology, Tianjin University
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Chapter 2: The Representation of Knowledge
Chapter 1: Introduction to Expert Systems Expert Systems: Principles and Programming, Fourth Edition Original by Course Technology Modified by Ramin Halavati.
Artificial Intelligence Knowledge Representation.
Survey on Expert System Seung Jun Lee Dept. of Nuclear and Quantum Engineering KAIST Mar 3, 2003.
Artificial Intelligence: Applications
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge Representation Techniques
Presented By S.Yamuna AP/CSE
Chapter 3: Methods of Inference
Chapter 7. Propositional and Predicate Logic
Arguments with Quantified Statements
Chapter 1: Introduction to Expert Systems
Advanced AI Session 2 Rule Based Expert System
CHAPTER 1 Introduction BIC 3337 EXPERT SYSTEM.
Introduction Characteristics Advantages Limitations
The following materials are borrowed from Prof. Ken Forbus’ class
Introduction to Prolog
Introduction to Expert Systems Bai Xiao
Artificial Intelligence
Chapter 3: Methods of Inference
Architecture Components
Chapter 6: Design of Expert Systems
Knowledge Representation
Propositional Logic and Methods of Inference
Intro to Expert Systems Paula Matuszek CSC 8750, Fall, 2004
Copyright © Cengage Learning. All rights reserved.
KNOWLEDGE REPRESENTATION
Expert Systems.
MA/CSSE 474 More Math Review Theory of Computation
Computer Security: Art and Science, 2nd Edition
Chapter 7. Propositional and Predicate Logic
This Lecture Substitution model
Chapter 1: Introduction to Expert Systems
Habib Ullah qamar Mscs(se)
Presentation transcript:

Introduction to Knowledge-based Systems ดร.มารุต บูรณรัช marut.bur@nectec.or.th 269618: หัวข้อพิเศษด้านเทคโนโลยีสารสนเทศขั้นสูง - เทคโนโลยีเว็บเชิงความหมาย (Special Topics in Advanced Information Technology – Semantic Web Technology) ภาควิชาวิทยาการคอมพิวเตอร์และเทคโนโลยีสารสนเทศ คณะวิทยาศาสตร์ มหาวิทยาลัยนเรศวร ภาคการศึกษาที่ 2 ปีการศึกษา 2557 These slides are taken with some adaptations from Expert Systems: Principles and Programming, 4th Edition by Joseph C. Giarratano & Gary D. Riley

Semantic Web Stack Adapted from http://en.wikipedia.org/wiki/Semantic_Web_Stack

Outline Introduction to Expert Systems History Components Functions and Applications Expert systems vs. Imperative programming Knowledge Representation and Logic Propositional logic Predicate logic Inference Methods

Introduction to Expert Systems

Artificial Intelligence AI = “Making computers think like people.” Artificial Intelligence (AI) is the part of computer science concerned with designing intelligent computer systems, that is, systems that exhibit the characteristics we associate with intelligence in human behavior – understanding language, learning reasoning, solving problems and so on. Barr and Feigenbaum, 1981 Expert Systems: Principles and Programming, Fourth Edition

Areas of Artificial Intelligence Expert Systems: Principles and Programming, Fourth Edition

What is an expert system? “An expert system is a computer system that emulates, or acts in all respects, with the decision-making capabilities of a human expert.” Professor Edward Feigenbaum Stanford University Expert Systems = knowledge-based systems = knowledge-based expert systems Expert Systems: Principles and Programming, Fourth Edition

More definitions “An expert system is a program that attempts to mimic human expertise by applying inference methods to a specific body of knowledge.” (Darlington, 2000) “An expert system is a system that employs human knowledge captured in a computer to solve problems that ordinarily require human expertise.” (Turban, 2001)

Expert system technology may include: Special expert system languages – CLIPS Programs Hardware designed to facilitate the implementation of those systems (e.g., in medicine) Expert Systems: Principles and Programming, Fourth Edition

Expert System Main Components Knowledge base – obtainable from books, magazines, knowledgeable persons, etc; or expertise knowledge. Inference engine – draws conclusions from the knowledge base. Expert Systems: Principles and Programming, Fourth Edition

Basic Functions of Expert Systems Expert Systems: Principles and Programming, Fourth Edition

Problem Domain vs. Knowledge Domain In general, the first step in solving any problem is defining the problem area or domain to be solved. An expert’s knowledge is specific to one problem domain – medicine, finance, science, engineering, etc. The expert’s knowledge about solving specific problems is called the knowledge domain. The problem domain is always a superset of the knowledge domain. Expert system reasons from knowledge domain. Expert Systems: Principles and Programming, Fourth Edition

Problem Domain vs. Knowledge Domain (2) Example: infections diseases diagnostic system does not have (or require) knowledge about other branches such as surgery. Expert Systems: Principles and Programming, Fourth Edition

Problem and Knowledge Domain Relationship Expert Systems: Principles and Programming, Fourth Edition

Advantages of Expert Systems Increased availability Reduced cost Reduced danger can be used in hazardous environment. Permanence last for ever, unlike human who may die, retire, quit. Multiple expertise several experts’ knowledge leads to Increased reliability Expert Systems: Principles and Programming, Fourth Edition

Advantages of Expert Systems (2) Explanation explain in detail how arrived at conclusions. Fast response e.g. emergency situations Steady, unemotional, and complete responses at all times: unlike human who may be inefficient because of stress or fatigue. Intelligent tutor provides direct instructions (student may run sample programs and explaining the system’s reasoning). Intelligent database access a database intelligently (e.g. data mining). Expert Systems: Principles and Programming, Fourth Edition

Representing the Knowledge The knowledge of an expert system can be represented in a number of ways, including IF-THEN rules: IF the light is red THEN stop Expert Systems: Principles and Programming, Fourth Edition

Representing the Knowledge: Car Failure Diagnosis IF the selection is 2 "Run-Stable State" AND the fuel is not burning well AND the engine running cycle is ok AND there is no blue gas AND the advance is bad THEN There is a Dirt in the injections/carburetor or The adjustment of ear and gasoline is not good, clear injections/carburetor and adjust the ear. Expert Systems: Principles and Programming, Fourth Edition

Knowledge Engineering The process of building an expert system: The knowledge engineer establishes a dialog with the human expert to elicit knowledge. The knowledge engineer codes the knowledge explicitly in the knowledge base. The expert evaluates the expert system and gives a critique to the knowledge engineer. Expert Systems: Principles and Programming, Fourth Edition

Development of an Expert System Expert Systems: Principles and Programming, Fourth Edition

The Role of AI Expert system relies on inference – we accept a “reasonable solution.” Expert Systems: Principles and Programming, Fourth Edition

Limitations of Expert Systems Uncertainty Having limited knowledge (more than possible outcomes) Both human experts and expert systems must be able to deal with uncertainty. Limitation 1: most expert systems deals with shallow knowledge than with deep knowledge. Shallow knowledge – based on empirical and heuristic knowledge. Deep knowledge – based on basic structure, function, and behavior of objects. Expert Systems: Principles and Programming, Fourth Edition

Limitations of Expert Systems (2) Limitation 2: typical expert systems cannot generalize through analogy to reason about new situations in the way people can. Solution: repeating the cycle of interviewing the expert. Limitation: A knowledge acquisition bottleneck results from the time-consuming and labor intensive task of building an expert system. Expert Systems: Principles and Programming, Fourth Edition

Early Expert Systems DENDRAL – used in chemical mass spectroscopy to identify chemical constituents MYCIN – medical diagnosis of illness DIPMETER – geological data analysis for oil PROSPECTOR – geological data analysis for minerals XCON/R1 – configuring computer systems Expert Systems: Principles and Programming, Fourth Edition

Broad Classes of Expert Systems Expert Systems: Principles and Programming, Fourth Edition

Problems with Algorithmic Solutions Conventional computer programs generally solve problems having algorithmic solutions. Algorithmic languages include C, Java, and C#. Classic AI languages include LISP and PROLOG. Expert Systems: Principles and Programming, Fourth Edition

Considerations for Building Expert Systems Can the problem be solved effectively by conventional programming? (expert systems are suited for ill-structured problems- problems with no efficient algorithmic solution) Is there a need and a desire for an expert system? Is there at least one human expert who is willing to cooperate? Can the expert explain the knowledge to the knowledge engineer in a way that can understand it. Is the problem-solving knowledge mainly heuristic and uncertain? Expert Systems: Principles and Programming, Fourth Edition

Elements of an Expert System User interface mechanism by which user and system communicate. Exploration facility explains reasoning of expert system to user. Working memory global database of facts used by rules. Inference engine makes inferences deciding which rules are satisfied and prioritizing. Expert Systems: Principles and Programming, Fourth Edition

Elements of an Expert System (2) Agenda a prioritized list of rules created by the inference engine, whose patterns are satisfied by facts or objects in working memory. Knowledge acquisition facility automatic way for the user to enter knowledge in the system bypassing the explicit coding by knowledge engineer. Expert Systems: Principles and Programming, Fourth Edition

Structure of a Rule-Based Expert System Expert Systems: Principles and Programming, Fourth Edition

Production Rules Knowledge base is also called production memory. Production rules can be expressed in IF-THEN pseudocode format. In rule-based systems, the inference engine determines which rule antecedents are satisfied by the facts. Expert Systems: Principles and Programming, Fourth Edition

Inference engine operates on recognize-act cycle While not done conflict resolution: act: match: check for halt: End-while Expert Systems: Principles and Programming, Fourth Edition

Inference engine operates on recognize-act cycle (2) Conflict resolution if there are activations then select the one with the highest priority. Else done. Act sequentially perform the actions. Update the working memory. Remove the fired activations. Match Update the agenda by checking if there are activation or remove activations if there LHS is no longer satisfied. Check for halt if an halt action is performed or break command given, then done. Expert Systems: Principles and Programming, Fourth Edition

General Methods of Inferencing Forward chaining reasoning from facts to the conclusions resulting from those facts – best for prognosis, monitoring, and control. Backward chaining reasoning in reverse from a hypothesis, a potential conclusion to be proved to the facts that support the hypothesis – best for diagnosis problems. Expert Systems: Principles and Programming, Fourth Edition

Production Systems Rule-based expert systems – most popular type today. Knowledge is represented as multiple rules that specify what should/not be concluded from different situations. Forward chaining – start w/facts and use rules do draw conclusions/take actions. Backward chaining – start w/hypothesis and look for rules that allow hypothesis to be proven true. Expert Systems: Principles and Programming, Fourth Edition

Post Production System Basic idea – any mathematical / logical system is simply a set of rules specifying how to change one string of symbols into another string of symbols. Basic limitation – lack of control mechanism to guide the application of the rules. Expert Systems: Principles and Programming, Fourth Edition

Procedural Paradigms Algorithm – method of solving a problem in a finite number of steps. Procedural programs are also called sequential programs. The programmer specifies exactly how a problem solution must be coded. Expert Systems: Principles and Programming, Fourth Edition

Procedural Languages Expert Systems: Principles and Programming, Fourth Edition

Imperative Programming Focuses on the concept of modifiable store variables and assignments. During execution, program makes transition from the initial state to the final state by passing through series of intermediate states. Provide for top-down-design. Not efficient for directly implementing expert systems. Expert Systems: Principles and Programming, Fourth Edition

Nonprocedural Paradigms Do not depend on the programmer giving exact details how the program is to be solved. Declarative programming goal is separated from the method to achieve it. Object-oriented programming – partly imperative and partly declarative uses objects and methods that act on those objects. Inheritance – (OOP) subclasses derived from parent classes. Expert Systems: Principles and Programming, Fourth Edition

Nonprocedural Languages Expert Systems: Principles and Programming, Fourth Edition

What are Expert Systems? Can be considered declarative languages: Programmer does not specify how to achieve a goal at the algorithm level. Induction-based programming – the program learns by generalizing from a sample. Expert Systems: Principles and Programming, Fourth Edition

Knowledge Representation & Logic

What is the study of logic? Logic is the study of making inferences given a set of facts, we attempt to reach a true conclusion. An example of informal logic is a courtroom setting where lawyers make a series of inferences hoping to convince a jury / judge. Formal logic (symbolic logic) is a more rigorous approach to proving a conclusion to be true / false. Expert Systems: Principles and Programming, Fourth Edition

Why is Logic Important We use logic in our everyday lives “should I buy this car?”, “should I seek medical attention?”. People are not very good at reasoning because they often fail to separate word meanings with the reasoning process itself. Semantics refers to the meanings we give to symbols. Expert Systems: Principles and Programming, Fourth Edition

The Goal of Expert Systems We need to be able to separate the actual meanings of words with the reasoning process itself. We need to make inferences w/o relying on semantics. We need to reach valid conclusions based on facts only. Expert Systems: Principles and Programming, Fourth Edition

Knowledge vs. Expert Systems Knowledge representation is key to the success of expert systems. Expert systems are designed for knowledge representation based on rules of logic called inferences. The process of reaching valid conclusions is referred to as logical reasoning. Expert Systems: Principles and Programming, Fourth Edition

How is Knowledge Used? Knowledge has many meanings – data, facts, information. How do we use knowledge to reach conclusions or solve problems? Heuristics refers to using experience to solve problems – using precedents. Expert systems may have hundreds / thousands of micro-precedents to refer to. Expert Systems: Principles and Programming, Fourth Edition

A Priori Knowledge “That which precedes” Independent of the senses Universally true Cannot be denied without contradiction Expert Systems: Principles and Programming, Fourth Edition

A Posteriori Knowledge “That which follows” Derived from the senses Not always reliable Deniable on the basis of new knowledge w/o the necessity of contradiction Expert Systems: Principles and Programming, Fourth Edition

Knowledge in Rule-Based Systems Knowledge is part of a hierarchy. Knowledge refers to rules that are activated by facts or other rules. Activated rules produce new facts or conclusions. Conclusions are the end-product of inferences when done according to formal rules. Expert Systems: Principles and Programming, Fourth Edition

Expert Systems vs. Humans Expert systems infer – reaching conclusions as the end product of a chain of steps called inferencing when done according to formal rules. Humans reason Expert Systems: Principles and Programming, Fourth Edition

Expert Systems vs. ANS Artificial Neural System (ANS) does not make inferences but searches for underlying patterns. Expert systems Draw inferences using facts Separate data from noise Transform data into information Transform information into knowledge Expert Systems: Principles and Programming, Fourth Edition

Productions A number of knowledge-representation techniques have been devised: Rules Semantic nets Frames Scripts Logic Conceptual graphs Expert Systems: Principles and Programming, Fourth Edition

Logic and Sets Knowledge can also be represented by symbols of logic. Logic is the study of rules of exact reasoning – inferring conclusions from premises. Automated reasoning Expert Systems: Principles and Programming, Fourth Edition

Forms of Logic Earliest form of logic was based on the syllogism – developed by Aristotle. Syllogisms – have two premises that provide evidence to support a conclusion. Example: Premise: All cats are climbers. Premise: Garfield is a cat. Conclusion: Garfield is a climber. Expert Systems: Principles and Programming, Fourth Edition

Venn Diagrams Expert Systems: Principles and Programming, Fourth Edition

Syllogism Premise: All men are mortal Premise: Socrates is a man Conclusion: Socrates is mortal Only the form is important. Premise: All X are Y Premise: Z is a X Conclusion: Z is a Y Expert Systems: Principles and Programming, Fourth Edition

Categorical Syllogism Syllogism: a valid deductive argument having two premises and a conclusion. major premise: All M are P minor premise: All S is M Conclusion: All S is P M middle term P major term S minor term Expert Systems: Principles and Programming, Fourth Edition

Categorical Statements Form Schema Meaning A All S is P universal affirmative E No S is P universal negative I Some S is P particular affirmative O Some S is not P particular negative Expert Systems: Principles and Programming, Fourth Edition

Figure 1 2 3 4 Major Premise M P P M Minor Premise S M M S Mood AAA-1 EAE-1 IAI-4 All M is P No M is P Some P is M All S is M All S is M All M is S All S is P No S is P Some S is P Expert Systems: Principles and Programming, Fourth Edition

Syllogisms vs. Rules Syllogism: IF-THEN rule: All basketball players are tall. Jason is a basketball player. => Jason is tall. IF-THEN rule: IF All basketball players are tall and Jason is a basketball player THEN Jason is tall. Expert Systems: Principles and Programming, Fourth Edition

Propositional Logic Concerned with the subset of declarative sentences that can be classified as true or false. We call these sentences “statements” or “propositions”. Paradoxes – statements that cannot be classified as true or false. Open sentences – statements that cannot be answered absolutely. Expert Systems: Principles and Programming, Fourth Edition

Propositional Logic (2) Compound statements – formed by using logical connectives (e.g., AND, OR, NOT, conditional, and biconditional) on individual statements. Material implication p  q states that if p is true, it must follow that q is true. Biconditional p  q states that p implies q and q implies p. Expert Systems: Principles and Programming, Fourth Edition

Propositional Logic (3) Syllogisms address only a small portion of the possible logical statements. Propositional logic offers another means of describing arguments.

Rule of Inference Modus ponens Modus tollens Direct reasoning ‘Assert’ Indirect reasoning ‘Deny’ Expert Systems: Principles and Programming, Fourth Edition

Modus ponens If there is power, the computer will work There is power ------------------------------ The computer will work A  B p, p ->q; q A -------------- B Expert Systems: Principles and Programming, Fourth Edition

Direct Reasoning: Modus Ponens Expert Systems: Principles and Programming, Fourth Edition

Modus tollens p  q conditional p -> q ~q converse q -> p -------------- inverse ~p -> ~q ~ p contrapositive ~q -> ~p Expert Systems: Principles and Programming, Fourth Edition

Limitations of Propositional Logic If an argument is invalid, it should be interpreted as such – that the conclusion is necessarily incorrect. An argument may be invalid because it is poorly created. An argument may not be provable using propositional logic, but may be provable using predicate logic. Expert Systems: Principles and Programming, Fourth Edition

Predicate Logic Predicates with arguments on-top-of(A, B) Variables and Quantifiers Universal (x)(Rational(x)  Real(x)) Existential (x)(Prime(x)) Functions of Variables (x)(Satellite(x))  (y)(closest(y, earth)^on(y,x)) (x)(man(x)  mortal(x)) ^ man(Socrates) => mortal(Socrates) Expert Systems: Principles and Programming, Fourth Edition

Universal Quantifier The universal quantifier, represented by the symbol  means “for every” or “for all”. (x) (x is a rectangle  x has four sides) The existential quantifier, represented by the symbol  means “there exists”. (x) (x – 3 = 5) Limitations of predicate logic – most quantifier. Expert Systems: Principles and Programming, Fourth Edition

First Order Predicate Logic Quantification not over predicate or function symbols No MOST quantifier, (counting required) Can not express things that are sometime true => Fuzzy Logic Expert Systems: Principles and Programming, Fourth Edition

Syllogism in Predicate Logic Type Scheme Predicate Representation A All S is P (x)(S(x) -> P(x)) E No S is P (x)(S(x) -> ~P(x)) I Some S is P (x)(S(x) ^ P(x)) A Some S is not P (x)(S(x) ^ ~P(x)) Expert Systems: Principles and Programming, Fourth Edition

Rule of Universal Instantiation The Rule of Universal Instantiation states that an individual may be substituted for a universe. (x)p(x) => p(a) p: any proposition or propositional function a: an instance Expert Systems: Principles and Programming, Fourth Edition

Formal Proof (x)(H(x)->M(x)) All men are mortal H(s) Socrates is a man M(s) => Socrates is mortal (x)(H(x)->M(x)) premise H(s) H(s)->M(s) universal instantiation 4. M(s) 2,3 modus ponens Expert Systems: Principles and Programming, Fourth Edition

Summary Expert systems or Knowledge-based systems captured human knowledge in a computer apply inference methods to the knowledge solve problems that normally required human expertise Expert systems uses declarative language (rules) rather than procedural language (algorithms) Expert Systems: Principles and Programming, Fourth Edition

Summary It is necessary to specify formal rules for expert systems to be able to reach valid conclusions from given facts. Propositional logic Rules of inference Determine true of false of statements (proposition) Predicate logic or First-order logic Formula that can contains variables that can be quantified Can allow for formal proof