Forward Chaining and Backward Chaining. Inference Engine cycles via a match-fire procedure Knowledge Base Database Fact:A isx MatchFire Fact:B isy Rule:

Slides:



Advertisements
Similar presentations
Rule-based representation
Advertisements

Inference Rules Universal Instantiation Existential Generalization
Expert Systems Reasonable Reasoning An Ad Hoc approach.
1 Rule Based Systems Introduction to Production System Architecture.
Expert Systems Reasonable Reasoning An Ad Hoc approach.
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.
Reasoning System.  Reasoning with rules  Forward chaining  Backward chaining  Rule examples  Fuzzy rule systems  Planning.
Intelligent systems Lecture 6 Rules, Semantic nets.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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.
Rule-based expert systems
 Negnevitsky, Pearson Education, Lecture 2 Rule-based expert systems n Introduction, or what is knowledge? n Rules as a knowledge representation.
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
Designing A KBS Rulebase Expert System Uncertainty Management
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.
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
Week 6 Expert System. Case Scenario During ABC Enterprise management meeting to discuss whether the company should consider a merger with other business.
EXPERT SYSTEMS Part I.
Inferencing using forward- and backward-chaining.
Building Knowledge-Driven DSS and Mining Data
Modelling planning problems using PDDL
Sepandar Sepehr McMaster University November 2008
© Negnevitsky, Pearson Education, Lecture 2 Introduction, or what is knowledge? Introduction, or what is knowledge? Rules as a knowledge representation.
1 Backward-Chaining Rule-Based Systems Elnaz Nouri December 2007.
Artificial Intelligence Lecture No. 15 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Rule-Based Expert Systems. Expert Systems  Acknowledge that computers do not posses general knowledge (common sense)  Attempt to train computer in a.
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,
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 
Expert Systems.
ARTIFICIAL INTELLIGENCE DR. ABRAHAM AI a field of computer science that is concerned with mechanizing things people do that require intelligent.
Rule-Based Expert System Aziz Kustiyo Departemen Ilmu Komputer FMIPA IPB 2011.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre
Types of logic. Propositional logic: syntax Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: Each rule has.
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
Inferencing in rule-based systems: forward and backward chaining.
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.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Lecture 2 Introduction, or what is knowledge? Introduction, or what is knowledge? Rules as a knowledge representation technique Rules as a knowledge representation.
Artificial Intelligence
Forward and Backward Chaining
Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating.
1 Chapter 13 Artificial Intelligence and Expert Systems.
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.
Lecture 20. Recap The main components of an ES are –Knowledge Base (LTM) –Working Memory (STM) –Inference Engine (Reasoning)
EA C461 Artificial Intelligence
Advanced AI Session 2 Rule Based Expert System
Intelligent Systems and Soft Computing
Chapter 9. Rules and Expert Systems
EA C461 – Artificial Intelligence Logical Agent
Rule-based expert systems
Introduction to Expert Systems Bai Xiao
Architecture Components
CS62S: Expert Systems Based on:
Chapter 9. Rules and Expert Systems
Presentation transcript:

Forward Chaining and Backward Chaining

Inference Engine cycles via a match-fire procedure Knowledge Base Database Fact:A isx MatchFire Fact:B isy Rule: IFA isx THEN B is y

E Database ABCD X MatchFire Knowledge Base X & B &EY ZY & D LC L &M AX N E Forward chaining E X Database ABCD MatchFire Knowledge Base X & B & EY ZY & D LC L & M AX N L Cycle One Cycle One

Forward chaining Cycle Two Cycle Three Y Z

Forward chaining Example Rule 1 If patient has sore throat And suspect a bacterial Infection Then patient has strep throat Rule 2 If patient temperature > 100 Then patient has a fever Rule 3 If patient has been sick over one month And patient has a fever Then we suspect a bacterial Infection

Forward chaining Example Cycle 1: Rule 2 true -> conclude Patient has a fever patient temperature = 102 patient been sick for two months patient has sore throat Database patient has a fever bacterial infection patient has strep throat Cycle 3 : Rule 1 true -> conclude patient has strep throat Cycle 2: Rule 3 true -> conclude bacterial infection

Backward Chaining – Goal Driven In contrast backward chaining:  goal driven, try to prove a specific goal  Work backwards from a conclusion and try to reach a set of conditions which establish that conclusion.  Start with a goal and use this to establish a set of sub-goals.  continue until goal is proved (or disproved), or no more matches

Backward chaining Backward chaining is the goal-driven reasoning. In backward chaining, an expert system has the goal (a hypothetical solution) and the inference engine attempts to find the evidence to prove it. First, the knowledge base is searched to find rules that might have the desired solution. Such rules must have the goal in their THEN (action) parts. If such a rule is found and its IF (condition) part matches data in the database, then the rule is fired and the goal is proved. However, this is rarely the case.

Backward chaining Thus the inference engine puts aside the rule it is working with (the rule is said to stack) And sets up a new goal, a subgoal, to prove the IF part of this rule The knowledge base is searched again for rules that can prove the subgoal The inference engine repeats the process of stacking the rules until no rules are found in the knowledge base to prove the current subgoal

Backward Chaining – Example 1 Goal: Z Knowledge Base Pass 1 Database BCDEA Z X & B & EY LC L & M AX N ZY & D Knowledge Base Sub-Goal: Y ABCDE Y ? X & B & EY ZY & D LC L & M AX N Pass 2 Database Sub-Goal: X Knowledge Base ABCDE X ? LC L & MN X & B & EY ZY & D AX Pass 3 Database

Backward Chaining – Example 1 Goal: Z Knowledge Base ACDE ZY B X MatchFire X & B &EY ZY & D LC L &M AX N Pass 6 Database MatchFire Knowledge Base ABCDE X Sub-Goal: X Pass 4 X & B &EY ZY & D LC L &M AX N Database Sub-Goal: Y MatchFire Knowledge Base ACDE YX B X & B &EY LC L &M AX N ZY & D Pass 5 Database

Backward Chaining - Example 2 Rule 1 If patient has sore throat And suspect a bacterial Infection Then patient has strep throat Rule 2 If patient temperature > 100 Then patient has a fever Rule 3 If patient has been sick over one month And patient has a fever Then we suspect a bacterial Infection Start with same set of facts: patient temperature = 102 patient has been sick for two months patient has sore throat But now start with goal Patient has a strep throat And try to prove this given the rules and the facts.

Example 2 : Backward Chaining Strep throat? Sore throat bacterial infection fever Temp>100 Sick > One month

Choosing between forward and backward chaining? If an expert first needs to gather some information and then tries to infer from it whatever can be inferred, choose the forward chaining inference engine. However, if your expert begins with a hypothetical solution and then attempts to find facts to prove it, choose the backward chaining inference engine.

Forward Chaining - Evaluation Advantages:  Works well when problem naturally begins by gathering information  Planning, control, monitoring Disadvantages:  Difficult to recognise if some evidence is more important than others  May ask un-related questions

Backward Chaining - Evaluation Advantages:  Remains focussed on a goal  Produces a series of questions that are relevant  Good for diagnosis Disadvantages:  Will continue to follow a line of reasoning even when it should switch.

pustaka Yeni Herdiyeni Materi kuliah Representasi pengetahuan dan Sistem Inferensia Materi lain dari berbagai sumber