Inferencing in rule-based systems: forward and backward chaining.

Slides:



Advertisements
Similar presentations
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
Advertisements

Forward Chaining and Backward Chaining. Inference Engine cycles via a match-fire procedure Knowledge Base Database Fact:A isx MatchFire Fact:B isy Rule:
Inferences The Reasoning Power of Expert Systems.
Knowledge Acquisition and Modelling
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.
1 Basic Architecture of an Expert System. 2 Knowledge base - contains the domain specific problem-solving knowledge. Facts - represent what we know at.
Best-First Search: Agendas
Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,
Rule Based Systems Michael J. Watts
Chapter 12: Expert Systems Design Examples
Rule Based Systems Alford Academy Business Education and Computing
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
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.
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
Rule-based Systems John Platt.
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
Inference in rule-based systems: forward and backward chaining.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
EXPERT SYSTEMS Part I.
Inferencing using forward- and backward-chaining.
Building Knowledge-Driven DSS and Mining Data
CPSC 433 Artificial Intelligence CPSC 433 : Artificial Intelligence Tutorials T01 & T02 Andrew “M” Kuipers note: please include.
Artificial Intelligence CSC 361
An expert system is a package that holds a body of knowledge and a set of rules on a subject that has been gained from human experts. An expert system.
ICT in Healthcare Expert Systems.
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.
1 Backward-Chaining Rule-Based Systems Elnaz Nouri December 2007.
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.
 Define A.I and discuss its application areas in detail.  Explain Turing test. why it is not justifiable to use it to test whether the machine is intelligent.
Introduction to Expert Systems Kostas Kontogiannis.
13: Inference Techniques
Production Systems A production system is –a set of rules (if-then or condition-action statements) –working memory the current state of the problem solving,
Artificial Intelligence
Course Instructor: K ashif I hsan 1. Chapter # 2 Kashif Ihsan, Lecturer CS, MIHE2.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Introduction to Expert Systems. Other Resources Handout at ECE Office.
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.
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
Problem Solving, Reasoning, & Judgment Claudia Stanny PSY 2012.
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.
COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre
1 Knowledge Based Systems (CM0377) Lecture 10 (Last modified 19th March 2001)
COM362 Knowledge Engineering Exam Revision 1 John MacIntyre
Expert Systems. Learning Objectives: By the end of this topic you should be able to: explain what is meant by an expert system describe the components.
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
Artificial Intelligence, simulation and modelling.
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.
Advanced AI Session 2 Rule Based Expert System
Artificial Intelligence, P.I
Chapter 9. Rules and Expert Systems
Introduction to Expert Systems Bai Xiao
final registration seminar presentation
Architecture Components
Inference in rule-based systems
CPSC 433 : Artificial Intelligence Tutorials T01 & T02
Chapter 9. Rules and Expert Systems
Inference in rule-based systems: forward and backward chaining
Presentation transcript:

Inferencing in rule-based systems: forward and backward chaining

l Declarative knowledge (facts about the world) n A set of declarations or statements. n All facts stated in a knowledge base fall into this category of knowledge. n In a sense, declarative knowledge tells us what a problem (or problem domain) is all about n Example: cheaper(coca_cola, pepsi) tastier(coca_cola, pepsi) if (cheaper(x,y) && (tastier(x,y) ) → buy(x)

l Procedural knowledge (how something is done) n Something that is not stated but which provides a mean of dynamically (usually at run-time) arriving at new facts. n Example: shopping script

Inferencing l Expert system programming is distinctively different from conventional programming.

Inferencing l Whereas one could describe a conventional program (or at least, the part of it that produces the results, as opposed to the user interface, etc) in these terms: Program = algorithm + data one would have to describe an expert system in these terms: Expert system = inference engine + knowledge base + data.

Inferencing l The inference engine uses one of several available forms of inferencing. l By inferencing I mean the method used in a knowledge-based system to process the supplied data, and the stored knowledge, so as to produce correct conclusions.

Inference in rule-based systems l Two control strategies: forward chaining and backward chaining

Inference in rule-based systems l Forward chaining: working from the facts to a conclusion. Sometimes called the data- driven approach. To chain forward, match data in working memory against 'conditions' of rules in the rule-base. n As described in some detail last week

Inference in rule-based systems n To chain forward, match data in working memory against 'conditions' of rules in the rule- base. n When one of them fires, this is liable to produce more data. n So the cycle continues

Inference in rule-based systems l Backward chaining: working from the conclusion to the facts. Sometimes called the goal-driven approach. n To chain backward, match a goal in working memory against 'conclusions' of rules in the rule-base. n When one of them fires, this is liable to produce more goals. n So the cycle continues.

Forward & backward chaining l e.g. Here are two rules: If corn is grown on poor soil, then it will get blackfly. If soil hasn't enough nitrogen, then it is poor soil. l Forward chaining: This soil is low in nitrogen; therefore this is poor soil; therefore corn grown on it will get blackfly. l Backward chaining: This corn has blackfly; therefore it must have been grown on poor soil; therefore the soil must be low in nitrogen.

Backward chaining l More realistically, n the forward chaining reasoning would be: there's something wrong with this corn. So I test the soil. It turns out to be low in nitrogen. If that’s the case, corn grown on it will get blackfly. Therefore the problem is blackfly caused by low nitrogen.

Backward chaining l More realistically, n the backward chaining reasoning would be: there's something wrong with this corn. Perhaps it has blackfly; if so, it must have been grown on poor soil; if so, the soil must be low in nitrogen. So test for low nitrogen content in soil, and then we'll know whether the problem was blackfly.

Forward & backward chaining l The choice of strategy depends on the nature of the problem. l Assume the problem is to get from facts to a goal (e.g. symptoms to a diagnosis).

Forward & backward chaining Backward chaining is the best choice if: l The goal is given in the problem statement, or can sensibly be guessed at the beginning of the consultation; or: l The system has been built so that it sometimes asks for pieces of data (e.g. "please now do the gram test on the patient's blood, and tell me the result"), rather than expecting all the facts to be presented to it.

Forward & backward chaining Backward chaining l This is because (especially in the medical domain) the test may be n expensive, n or unpleasant, n or dangerous for the human participant so one would want to avoid doing such a test unless there was a good reason for it.

Forward & backward chaining Forward chaining is the best choice if: l All the facts are provided with the problem statement; or: l There are many possible goals, and a smaller number of patterns of data; or: l There isn't any sensible way to guess what the goal is at the beginning of the consultation.

Forward & backward chaining l Note also that n a backwards-chaining system tends to produce a sequence of questions which seems focussed and logical to the user, n a forward-chaining system tends to produce a sequence which seems random & unconnected. l If it is important that the system should seem to behave like a human expert, backward chaining is probably the best choice.

Forward & backward chaining l Some systems use mixed chaining, where some of the rules are specifically used for chaining forwards, and others for chaining backwards. The strategy is for the system to chain in one direction, then switch to the other direction, so that: n the diagnosis is found with maximum efficiency; n the system's behaviour is perceived as "human".

Meta-rules l Meta-rules are rules which alter the reasoning process: these can make a production system more flexible. n e.g. a rule which chooses a particular style of conflict-resolution, on the basis of data in the working memory. n Or a rule which switches from forward to backward chaining at a suitable moment in the reasoning process. n Or a rule which "decides" to consider a certain type of rule before other types.