Chapter 9: Rules and Expert Systems Lora Streeter.

Slides:



Advertisements
Similar presentations
EXPERT SYSTEMS AND KNOWLEDGE REPRESENTATION Ivan Bratko Faculty of Computer and Info. Sc. University of Ljubljana.
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.
Rules, page 1 CSI 4106, Winter 2005 Representing knowledge with rules Points Definitions Production systems Conflict resolution strategies Examples A financial.
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.
B. Ross Cosc 4f79 1 Forward chaining backward chaining systems: take high-level goal, and prove it by reducing it to a null goal - to reduce it to null,
Intelligent systems Lecture 6 Rules, Semantic nets.
Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,
Rule Based Systems Michael J. Watts
Artificial Intelligence Lecture No. 16
Chapter 12: Expert Systems Design Examples
Rule Based Systems Alford Academy Business Education and Computing
Intelligent Systems and Soft Computing
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
Introduction to Expert Systems
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
CIS 430 ( Expert System ) Supervised By : Mr. Ashraf Yaseen Student name : Ziad N. Al-A’abed Student # : EXPERT SYSTEM.
1 Pertemuan 6 RULE-BASED SYSTEMS Matakuliah: H0383/Sistem Berbasis Pengetahuan Tahun: 2005 Versi: 1/0.
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.
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.
Chapter 3: Methods of Inference Expert Systems: Principles and Programming, Fourth Edition.
Building Knowledge-Driven DSS and Mining Data
Artificial Intelligence CSC 361
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.
1 Backward-Chaining Rule-Based Systems Elnaz Nouri December 2007.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Artificial Intelligence Lecture No. 15 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Rule-Based Expert Systems
Invitation to Computer Science 5th Edition
Artificial Intelligence Introduction (2). What is Artificial Intelligence ?  making computers that think?  the automation of activities we associate.
Chapter 14: Artificial Intelligence Invitation to Computer Science, C++ Version, Third Edition.
13: Inference Techniques
INTELLIGENT SYSTEMS Rule based systems 1. Aims of session To understand  Basic principles  Forward chaining  Problems with rule-based systems  Backward.
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.
 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,
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
Intro to Computation and AI Dr. Jill Fain Lehman School of Computer Science Lecture 6: December 4, 1997.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
CS62S: Expert Systems Based on: The Engineering of Knowledge-based Systems: Theory and Practice, A. J. Gonzalez and D. D. Dankel.
Rules and Expert Systems
Inferencing in rule-based systems: forward and backward chaining.
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.
 Negnevitsky, Pearson Education, Introduction, or what is knowledge? Knowledge is a theoretical or practical understanding of a subject or a domain.
Artificial Intelligence
Forward and Backward Chaining
Expert System Seyed Hashem Davarpanah University of Science and Culture.
Artificial Intelligence, simulation and modelling.
1 Chapter 13 Artificial Intelligence and Expert Systems.
Representation and Search The function of a representation is to capture the critical features of the problem domain –and make the information accessible.
Artificial Intelligence: Applications
By Muhammad Safdar MCS [E-Section].  There are times in life when you are faced with challenging decisions to make. You have rules to follow and general.
Intelligent Systems Rule based systems 1. Aims of session To understand Basic principles Forward chaining Problems with rule-based systems Backward chaining.
Lecture 20. Recap The main components of an ES are –Knowledge Base (LTM) –Working Memory (STM) –Inference Engine (Reasoning)
Chapter 3: Methods of Inference
Advanced AI Session 2 Rule Based Expert System
Chapter 9. Rules and Expert Systems
Chapter 3: Methods of Inference
Architecture Components
Chapter 9. Rules and Expert Systems
Expert Knowledge Based Systems
Presentation transcript:

Chapter 9: Rules and Expert Systems Lora Streeter

Rules for Knowledge Representation IF...THEN... rules can be used to represent knowledge about objects IF A THEN B or A → B For example: IF name is “Bob” AND weather is cold THEN tell Bob 'Wear a coat'

Rule-Based (or Production) Systems Provide recommendations or diagnoses Determine a course of action in a particular situation Solve a particular problem Consists of:  A database of rules (aka knowledge base)  A database of facts  An interpreter, or inference engine

Rule Based Systems Knowledge base = set of rules that represent the system's knowledge Database of facts = inputs to the system that are used to derive conclusions or to cause actions Interpreter = controls the process of arriving at conclusions

Forward Chaining aka data-driven reasoning  Start reasoning from a set of data and ends up at the goal Check facts in the fact database and compare to rule database When they match up, that rule is triggered, and its' conclusion added to the facts database

Forward Chaining Example Rule 1: IF on 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 go to second floor 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.

Forward Chaining Example We start with these facts in our database:  Fact 1: At first floor  Fact 2: Button pressed on third floor  Fact 3: Today is Tuesday The system see that this matches Rule 3 (IF on first floor AND button is pressed on third floor, THEN go to third floor) The conclusion, “Go to third floor” is added to the database of facts Fact 3 matches none of our rules and is ignored

Forward Chaining Example Later in the day, our facts database now contains the following information:  Fact 1: At first floor  Fact 2: Button pressed on second floor  Fact 3: Button pressed on third floor Both rules 2 and 3 are triggered! We need to use some conflict resolution to sort this out

Conflict Resolution Consider these rules:  IF it is cold, THEN wear a coat  IF it is cold, THEN stay at home  IF it is cold, THEN turn on the heat Now if we have one fact in our database:  It is cold. Clearly three possible outcomes can be derived All three conclusions could easily be followed, but...

Conflict Resolution...many times conclusions are incompatible!  e.g. when prescribing medicines to patients One solution: rules are given priority levels If a conflict arises, highest priority wins  IF patient has pain,THEN prescribe painkillers priority 10  IF patient has chest pain, THEN treat for heart disease priority 100

Conflict Resolution Another method is the longest-matching strategy  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 The more specific match would be the rule that fires A further method is to fire the rule that has matched the facts most recently added to the database.

Chaining Forward chaining applies rules/facts to deduce whatever conclusions can be derived  Don't know what conclusions you're trying to prove  Can be inefficient by proving conclusions that aren't interesting If we're trying to prove a single specific conclusion, backward chaining is more appropriate

Backward Chaining Start from a conclusion (hypothesis) we want to prove Show how it can be reached with rules and facts in the database The conclusion we're aiming for is called a goal  Reasoning in this way is known as goal-driven reasoning

Forward vs. Backward Chaining Rule 1: A ^ B → C Rule 2: A → D Rule 3: C ^ D → E Rule 4: B ^ E ^ F → G Rule 5: A ^ E → H Rule 6: D ^ E ^ H → I As for conflict resolution, fire the rules in the order they appear in the database Fact 1: A Fact 2: B Fact 3: F Goal: Prove H

Forward Chaining Rule 1: A^B → C Rule 2: A → D Rule 3: C^D → E Rule 4: B^E^F → G Rule 5: A^E → H Rule 6: D^E^H → I Facts: A, B, F Goal: H

Backward Chaining Rule 1: A^B → C Rule 2: A → D Rule 3: C^D → E Rule 4: B^E^F → G Rule 5: A^E → H Rule 6: D^E^H → I Facts: A, B, F Goal: H

Forward vs Backward Chaining Used in many situations  A set of facts is available  Conclusion is not already known  Many possible conclusions Few (or even just one) conclusion Many possible facts Not very many are necessarily relevant to the conclusion

Rule-Based Expert Systems Model the behavior of an expert in some field Designed to use the same rules that the expert would use to draw conclusions Involve a number of people  End-user: the person who needs the system  Knowledge engineer: designer of rules  Domain expert: explain to the knowledge engineer how they go about diagnosing the problems

Architecture of an Expert System A typical expert system architecture

Architecture of an Expert System Knowledge base has domain specific knowledge represented by rules Explanation system shows how the inference engine arrived at its conclusions  Essential if the advice is of critical nature, such as with a medical diagnosis system Fact database has case-specific data Inference engine uses the rules and facts to derive conclusions Knowledge base editor used to update the information contained in the system

The Rete Algorithm Problems with an expert system?  Lots of comparisons between rules and facts in the database Solution?  The Rete Algorithm, an efficient method for solving impractical rule/fact comparisons

The Rete Algorithm Is a directed, acyclic, rooted graph  aka a search tree Each path from the root node to a leaf in the tree represents the left-hand side of the rule  Stores details of which facts have been matched by rules at that point As facts are changed, the new facts are propagated down, changing node info accordingly  May add new fact, change info about an old fact, or delete an old fact

The Rete Algorithm Depends on the principle that when using forward chaining, the object values change relatively infrequently  Few changes have to be made to the tree  Not particularly efficient where objects are continually changing

Rules and Expert Systems The End