COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre 0191 515 3778

Slides:



Advertisements
Similar presentations
Some Prolog Prolog is a logic programming language
Advertisements

1 Knowledge Based Systems (CM0377) Lecture 11 (Last modified 26th March 2001)
Inference Rules Universal Instantiation Existential Generalization
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,
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
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.
Programming Types of Testing.
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,
Rule Based Systems Michael J. Watts
Artificial Intelligence Lecture No. 16
Chapter 12: Expert Systems Design Examples
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Computer Intelligence and Soft Computing
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
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
Methods of Proof Chapter 7, second half.
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
EXPERT SYSTEMS Part I.
Inferencing using forward- and backward-chaining.
Building Knowledge-Driven DSS and Mining Data
Modelling planning problems using PDDL
CPSC 433 Artificial Intelligence CPSC 433 : Artificial Intelligence Tutorials T01 & T02 Andrew “M” Kuipers note: please include.
Chapter 3 Planning Your Solution
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.
1 California State University, Fullerton Chapter 8 Personal Productivity and Problem Solving.
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.
COM362 Knowledge Engineering Detail Intro to AionDS 1 Detailed Introduction to AionDS Odin Taylor
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
Lead Black Slide Powered by DeSiaMore1. 2 Chapter 8 Personal Productivity and Problem Solving.
 Architecture and Description Of Module Architecture and Description Of Module  KNOWLEDGE BASE KNOWLEDGE BASE  PRODUCTION RULES PRODUCTION RULES 
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
ARTIFICIAL INTELLIGENCE DR. ABRAHAM AI a field of computer science that is concerned with mechanizing things people do that require intelligent.
Soft Computing Lecture 19 Part 2 Hybrid Intelligent Systems.
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.
Inferencing in rule-based systems: forward and backward chaining.
Chapter 4: Inference Techniques
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
COM362 Knowledge Engineering Exam Revision 1 John MacIntyre
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Artificial Intelligence
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
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.
Artificial Intelligence: Applications
Expert Systems By James Jennings Introduction  What is an Expert system?  expert system is a computer system that emulates the decision-making ability.
EXPERT SYSTEMS BY MEHWISH MANZER (63) MEER SADAF NAEEM (58) DUR-E-MALIKA (55)
EA C461 Artificial Intelligence
Advanced AI Session 2 Rule Based Expert System
Introduction to Expert Systems Bai Xiao
Architecture Components
Inference in rule-based systems
KNOWLEDGE REPRESENTATION
CPSC 433 : Artificial Intelligence Tutorials T01 & T02
Methods of Proof Chapter 7, second half.
Presentation transcript:

COM362 Knowledge Engineering Inferencing 1 Inferencing: Forward and Backward Chaining John MacIntyre

COM362 Knowledge Engineering Inferencing 2 The Inference Process Inference-based data processing relies on some form of moving through the rules in the KBS The two main forms of inferencing are: FORWARD CHAINING BACKWARD CHAINING However, there are other inferencing techniques

COM362 Knowledge Engineering Inferencing 3 A Review of Rules Follow an IF...THEN... format In English language: IF the Pump’s temperature is hot THEN follow maintenance instructions In AionDS this would be expressed as: IFMATCH Pump with temperature is ‘hot’ THEN send (Print Maintenance to Pump) END

COM362 Knowledge Engineering Inferencing 4 How Inferencing Works The inference engine’s job is to decide which RULE ANTECEDENTS (the IF bit) are satisfied by the FACTS (the data) FACTS can be stored in the knowledge base, inferred by the inference engine, or supplied by the user Different types of problem can be better solved by different inference approaches

COM362 Knowledge Engineering Inferencing 5 Data vs Goal Driven A choice must be made Do we drive the inference based on the DATA, or Do we drive the inference based on the GOALS of the process?

COM362 Knowledge Engineering Inferencing 6 Data vs Goal Driven Data driven starts with the data, and fires rule to infer new information Usually achieved by forward chaining Goal driven starts with the goal of a required solution and tries to match the facts to the solution Usually achieved by backward chaining

COM362 Knowledge Engineering Inferencing 7 Forward Chaining A simplified view of forward chaining is as follows: 1. Enter new data 2. Fire forward-chaining rules 3. Rule actions infer new data values 4. Go to Step 2 5. Repeat until no new data can be inferred 6. If no solution, rule base is insufficient

COM362 Knowledge Engineering Inferencing 8...continued

COM362 Knowledge Engineering Inferencing 9 Cascading Rules Only applicable in forward chaining Rule executes causing inference of new data New data is added to knowledge base New data causes other rules to fire The process may repeat - hence a ‘cascade’ effect through the knowledge base

COM362 Knowledge Engineering Inferencing 10 Cascading Example RULE 1: IF a driver is assigned AND a forklift operator is assigned AND a foreman is assigned THEN all workers have been assigned to the shift RULE2: IF all workers have been assigned to the shift AND day is Saturday AND overtime is authorised THEN work can begin

COM362 Knowledge Engineering Inferencing 11 Driving with Data In forward chaining, data is entered ‘up front’, usually in the user’s interaction with the knowledge base This is usually best done form-by-form, rather than question-by-question Necessary to devise input displays with relevant groups of questions Forward-chaining rules can only fire when all information in the antecedent is available

COM362 Knowledge Engineering Inferencing 12...continued Inference engine will not try automatically to source unknown information If it is likely that the system will require information from the user at run-time, then backward chaining may be more appropriate Therefore need to analyse the implementation to decide on inference mechanism most appropriate

COM362 Knowledge Engineering Inferencing 13...continued Small amounts of data can trigger a large number of new assertions Remember, forward chaining rules cannot fire until all the conditions in the premise are satisfied Rule priorities can be used to change the order in which rules are fired

COM362 Knowledge Engineering Inferencing 14 Why Forward Chain?

COM362 Knowledge Engineering Inferencing 15 Backward Chaining A simplified view of backward chaining is as follows: 1. State a goal 2. Find rules which resolve the goal 3. At run-time, answer questions to satisfy the antecedents of the rules as required 4. Obtain a result: goal is resolved or not

COM362 Knowledge Engineering Inferencing 16...continued

COM362 Knowledge Engineering Inferencing 17 Driving with Goals In backward chaining, the process is trying to satisfy a goal or sub-goal The results of executing backward chaining rules is the determination of a value for the initiating goal Backward chaining rules search for supporting data on an ‘as needed’ basis Rules unrelated to the chain of reasoning are not used

COM362 Knowledge Engineering Inferencing 18 Input to BC Rules Input for backward chaining may come from: Pre-existing values in the KB Questions asked of the user Accessing values from an external database Execution of external calculations

COM362 Knowledge Engineering Inferencing 19 Output from BC Rules Can usually be phrased as a question: “What is the value?” BC rules often used to achieve multiple goals during a single execution of the inference process If the value for the goal is not found, then BC concludes that these particular rules cannot find the value, not that the value does not exist

COM362 Knowledge Engineering Inferencing 20 Why Backward Chain?

COM362 Knowledge Engineering Inferencing 21 Choosing FC or BC The criteria which you must consider when choosing FC or BC are: The logical reasoning process Design features of the system What are the inputs, and where do they come from? What are the outputs, and where do they go? How do these map to FC or BC?

COM362 Knowledge Engineering Inferencing 22...continued Most problems can be solved using either FC or BC However, almost always one or the other is preferable (more efficient, more robust) Therefore worthwhile considering which is the most appropriate, and using it

COM362 Knowledge Engineering Inferencing 23 A Rough(!) Guide