Rules and Expert Systems

Slides:



Advertisements
Similar presentations
STRONG METHOD PROBLEM SOLVING
Advertisements

CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
1 Rule Based Systems Introduction to Production System Architecture.
Rulebase Expert System and Uncertainty. Rule-based ES Rules as a knowledge representation technique Type of rules :- relation, recommendation, directive,
Building a Knowledge Base with VPExpert (VPX. exe) see also: vpxguide
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
Inferences The Reasoning Power of Expert Systems.
ICT IGCSE Expert Systems.
 You will be able to: › Explain what is meant by an expert system and describe its components and applications.
Reasoning System.  Reasoning with rules  Forward chaining  Backward chaining  Rule examples  Fuzzy rule systems  Planning.
Intelligent systems Lecture 6 Rules, Semantic nets.
Rule Based Systems Michael J. Watts
Chapter 12: Expert Systems Design Examples
Rule Based Systems Alford Academy Business Education and Computing
1 5.0 Expert Systems Outline 5.1 Introduction 5.2 Rules for Knowledge Representation 5.3 Types of rules 5.4 Rule-based systems 5.5 Reasoning approaches.
Lecture 04 Rule Representation
Artificial Intelligence CAP492
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.
© C. Kemke1Reasoning - Introduction COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
EXPERT SYSTEMS Part I.
1 Chapter 18 Fuzzy Reasoning. 2 Chapter 18 Contents (1) l Bivalent and Multivalent Logics l Linguistic Variables l Fuzzy Sets l Membership Functions l.
Building Knowledge-Driven DSS and Mining Data
CPSC 433 Artificial Intelligence CPSC 433 : Artificial Intelligence Tutorials T01 & T02 Andrew “M” Kuipers note: please include.
ES: Expert Systems n Knowledge Base (facts, rules) n Inference Engine (software) n User Interface.
Artificial Intelligence CSC 361
Introduction to Rule-Based Systems, Expert Systems, Fuzzy Systems Introduction to Rule-Based Systems, Expert Systems, Fuzzy Systems (sections 2.7, 2.8,
Sepandar Sepehr McMaster University November 2008
Expert Systems Infsy 540 Dr. Ocker. Expert Systems n computer systems which try to mimic human expertise n produce a decision that does not require judgment.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
Artificial Intelligence Lecture No. 15 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Chapter 14: Artificial Intelligence Invitation to Computer Science, C++ Version, Third Edition.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Artificial Intelligence
School of Computer Science and Technology, Tianjin University
Knowledge based Humans use heuristics a great deal in their problem solving. Of course, if the heuristic does fail, it is necessary for the problem solver.
Chapter 9: Rules and Expert Systems Lora Streeter.
 Architecture and Description Of Module Architecture and Description Of Module  KNOWLEDGE BASE KNOWLEDGE BASE  PRODUCTION RULES PRODUCTION RULES 
1 CHAPTER 13 Decision Support Systems and Intelligent Systems, Efraim Turban and Jay E. Aronson 6th ed, Copyright 2001, Prentice Hall, Upper Saddle River,
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
Chapter 13 Artificial Intelligence and Expert Systems.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
ES component and structure Dr. Ahmed Elfaig The production system or rule-based system has three main component and subcomponents shown in Figure 1. 1.Knowledge.
COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre
Rules and Expert Systems
Inferencing in rule-based systems: forward and backward chaining.
COM362 Knowledge Engineering Exam Revision 1 John MacIntyre
Chapter 9. Rules and Expert Systems Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
1 Intelligent Systems and Control Rule-based expert systems n Introduction, or what is knowledge? n Rules as a knowledge representation technique n The.
Of An Expert System.  Introduction  What is AI?  Intelligent in Human & Machine? What is Expert System? How are Expert System used? Elements of ES.
Artificial Intelligence
Forward and Backward Chaining
Expert System Seyed Hashem Davarpanah University of Science and Culture.
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
1 Chapter 13 Artificial Intelligence and Expert Systems.
Artificial Intelligence Knowledge Representation.
Artificial Intelligence: Applications
EXPERT SYSTEMS BY MEHWISH MANZER (63) MEER SADAF NAEEM (58) DUR-E-MALIKA (55)
Advanced AI Session 2 Rule Based Expert System
CHAPTER 1 Introduction BIC 3337 EXPERT SYSTEM.
Chapter 9. Rules and Expert Systems
Introduction to Expert Systems Bai Xiao
Architecture Components
Artificial Intelligence (CS 370D)
Intro to Expert Systems Paula Matuszek CSC 8750, Fall, 2004
Artificial Intelligence
CPSC 433 : Artificial Intelligence Tutorials T01 & T02
Chapter 9. Rules and Expert Systems
Habib Ullah qamar Mscs(se)
Presentation transcript:

Rules and Expert Systems Chapter 9 Rules and Expert Systems

Definition of Expert System An expert system is a computer program that represents and reasons with knowledge of some specialist subject with a view to solve problems or giving advice.

Chapter 9 Contents (1) Rules for Knowledge Representation Rule Based Production Systems Forward Chaining Conflict Resolution Meta Rules Backward Chaining The Architecture of Expert Systems Expert System Shells

Chapter 9 Contents (2) The Rete Algorithm Knowledge Engineering CLIPS Backward Chaining in Expert Systems CYC

Rules for Knowledge Representation IF… THEN Rules can be used to represent knowledge: IF it rains, then you will get wet IF A THEN B Can be expressed as: A B Here, A is called antecedent, and B is called consequent. Rules can also be recommendations: IF it rains, then you should wear a coat

Rule Based Production Systems A production system is a system that uses knowledge in the form of rules to provide diagnoses or advice on the basis of input data. The system consists of: 1. A database of rules (knowledge base), 2. A database of facts, and 3. An inference engine which reasons about the facts using the rules.

Forward Chaining (Data Driven System) Forward chaining is a reasoning model that works from a set of facts and rules towards a set of conclusions, diagnoses or recommendations. When a fact matches the antecedent of a rule, the rule is triggered, then the rule is fired, and the conclusion of the rule is added to the database of facts.

Example Consider the rules that is used to control an elevator in a 3-story building: Rule 1: IF on the first floor and button is pressed on first floor THEN open door Rule 2: IF on first floor AND button is pressed on second floor THEN goto second floor

Example Rule 3: IF on first floor AND button is pressed on third floor THEN go to third floor Rule 4: IF on second floor AND button is pressed on first floor AND already going to third floor THEN remember to go to first floor later … , …

The example only listed a subset of the rules (partial rules), we can keep doing the list of the rules to finish the control. How do you finish the list?

Conflict Resolution Sometimes more than one rule will fire at once, and a conflict resolution strategy must be used to decide which conclusions to use. One strategy is to give rules priorities and to use the conclusion that has the highest priority. Other strategies include applying the rule with the longest antecedent, or applying the rule that was most recently added to the database.

Example Consider the following rules: IF it is cold THEN wear a coat THEN stay at home THEN turn on the heat Obviously, one antecedent can trigger three rules here. We might need to give the rules priorities to decide which one to pick first. Or, we can add more conditions to make some antecedents longer than others.

Example By applying priorities: IF patient has pain THEN prescribe painkillers priority 10 … IF patient has chest pain THEN treat for heart disease priority 100

Make Differences in Antecedents According Their Length IF patient has pain THEN prescribe painkiller … IF patient has chest pain AND patient is over 60 AND patient has history of heart conditions THEN take to emergency room

Meta Rules The rules that determine the conflict resolution strategy are called meta rules. Meta rules define knowledge about how the system will work. For example, meta rules might define that knowledge from Expert A is to be trusted more than knowledge from Expert B. This kind of knowledge is called meta knowledge. It is knowledge about knowledge. Meta rules are treated by the system like normal rules, but are given higher priority.

Backward Chaining In cases where a particular conclusion is to be proved, backward chaining can be more appropriate. Works back from a conclusion towards the original facts. When a conclusion matches the conclusion of a rule in the database, the antecedents of the rule are compared with facts in the database.

Comparing Forward and Backward Chaining Choose forward or backward chaining will depend on the specific problems. Sometimes backward chaining is much faster and sometimes forward chaining is much faster. Sometimes, they are about the same.

Example Rules: 1. A Λ B C 2. A B 3. C Λ D E 4. B Λ E Λ F G 5. A Λ E H 6. D Λ E Λ H I Facts: 1. A 2. B 3. F Goal: to prove H.

By using Forward Chaining Facts Rules Triggered Rule Fired A, B, F 1, 2 1 A, B, C, F 2 2 A, B, C, D, F 3 3 A, B, C, D, E, F 4, 5 4 A, B, C, D, E, F, G 5 5 A, B, C, D, E, F, G, H 6 Stop

Backward Chaining Facts Goal Matching Rules A, B, F H 5 A, B, F E 3 A, B, F C, D 1 A, B, C, F D 2 A, B, C, D, F Stop This specific example has made us use 1 rule less than forward chaining.

The Architecture of Expert Systems (1) An expert system uses expert knowledge derived from human experts to diagnose illnesses, provide recommendations and solve other problems.

The Architecture of Expert Systems (2) Knowledge base: database of rules (domain knowledge). Explanation system: explains the decisions the system makes. User Interface: the means by which the user interacts with the expert system. Knowledge base editor: allows the user to edit the information in the knowledge base.

Expert System Shells The part of an expert system that does not contain any domain specific or case specific knowledge is the expert system shell. A single expert system shell can be used to build a number of different expert systems. An example of an expert system shell is CLIPS.

The Rete Algorithm A rete is a directed, acyclic, rooted graph (a tree). A path from the root node to a leaf represents the left hand side of a rule. Each node stores details of which facts have been matched so far. As facts are changed, the changes are propagated through the tree. This makes an efficient way for expert systems to deal with environments which change often.

Knowledge Engineering A knowledge engineer takes knowledge from experts and inputs it into the expert system. A knowledge engineer will usually choose which expert system shell to use. The knowledge engineer is also responsible for entering meta-rules.

CLIPS CLIPS is C Language Integrated Production System – an expert system shell. CLIPS uses a LISP-like notation to enter rules.

Backward Chaining in Expert Systems Backward chaining is often used in expert systems that are designed for medical diagnosis: For each hypothesis, H: If H is in the facts database, it is proved. Otherwise, if H can be determined by asking a question, then enter the user’s answer in the facts database. Hence, it can be determined whether H is true or false, according to the user’s answer. Otherwise, find a rule whose conclusion is H. Now apply this algorithm to try to prove this rule’s antecedents. If none of the above applies, we have failed to prove H. Usually backward chaining is used in conjunction with forward chaining.

CYC A frame based production system. Uses a database of over 1,000,000 facts and rules, encompassing all fields of human knowledge. CYC can answer questions about all kinds of knowledge in its database, and can even understand analogies, and other complex relations.

What is CYC? CYC is the name of a very large, multi-contextual knowledge base and inference engine, the development of which started at the Microelectronics and Computer Technology Corporation (MCC) in Austin, Texas during the early 1980s.

CYC Over the past eleven years the members of the CYC team have added to the knowledge base a huge amount of fundamental human knowledge: facts, rules of thumb, and heuristics for reasoning about the objects and events of modern everyday life.

CYC CYC is an attempt to do symbolic AI on a massive scale. It is not based on numerical methods such as statistical probabilities, nor is it based on neural networks or fuzzy logic. All of the knowledge in CYC is represented declaratively in the form of logical assertions. CYC presently contains approximately 400,000 significant assertions, which include simple statements of fact, rules about what conclusions to draw if certain statements of fact are satisfied (true), and rules about how to reason with certain types of facts and rules. New conclusions are derived by the inference engine using deductive reasoning.

CYC Who is doing CYC? Much of the CYC work has been done at the Microelectronics and Computer Technology Corporation in Austin, Texas. As of the First of January in 1995, a new independent company named Cycorp has been created to further the work done on the CYC project. Cycorp continues to be based in Austin, Texas. The development of CYC has been supported by several organizations, including Apple, Bellcore, DEC, DoD, Interval, Kodak, and Microsoft.