We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byDexter Lasky
Modified about 1 year ago
Reasoning Forward and Backward Chaining Andrew Diniz da Costa firstname.lastname@example.org
© LES/PUC-Rio Roadmap Overview about Reasoning Forward Chaining –Presentation –Examples Backward Chaining –Presentation –Examples JTP API Final Considerations
© LES/PUC-Rio Reasoning Reasoning is the mental (cognitive) process of looking for reasons to support beliefs, conclusions, actions or feelings. In philosophy, the study of reasoning typically focuses on what makes reasoning efficient or inefficient, appropriate or inappropriate, good or bad.
© LES/PUC-Rio Reasoning The main division between forms of reasoning that is made in philosophy is between deductive reasoning and inductive reasoning. Formal logic has been described as 'the science of deduction'. The study of inductive reasoning is generally carried out within the field known as informal logic or critical thinking.
© LES/PUC-Rio Deductive Reasoning Deductive arguments are intended to have reasoning that is valid. Reasoning in an argument is valid if the argument's conclusion must be true when the premises (the reasons given to support that conclusion) are true. Example Premise 1: All humans are mortal. Premise 2: Socrates is a human. Conclusion: Socrates is mortal.
© LES/PUC-Rio Deductive Reasoning Within the field of formal logic, a variety of different forms of deductive reasoning have been developed. Some logics –Modal logic –Propositional logic –Predicate logic
© LES/PUC-Rio Inductive Reasoning Inductive reasoning contrasts strongly with deductive reasoning. Even in the best, or strongest, cases of inductive reasoning, the truth of the premises does not guarantee the truth of the conclusion. The conclusion of an inductive argument follows with some degree of probability. Example –Premise: The sun has risen in the east every morning up until now. –Conclusion: The sun will also rise in the east tomorrow.
© LES/PUC-Rio Reasoning If-then rules have become the most popular form of declarative knowledge representation used in AI applications. Algorithms to process if-the rules –Forward Chaining –Backward Chaining Forward Chaining can be used to produce new facts Backward Chaining can deduce whether conclusions are true or not.
© LES/PUC-Rio Forward Chaining It is one of the two main methods of reasoning when using inference rules. Forward chaining starts with the available data until a goal to be reached. Use inference rules to extract more data until a goal to be reached.
© LES/PUC-Rio Forward Chaining An inference engine using forward chaining searches the inference rules until it finds one where the If clause is known to be true. When found it can conclude, or infer, the Then clause, resulting in the addition of new information to its dataset. Require three basic elements –A knowledge base of rules and facts; –A working memory for storing data during inferencing; –An inference engine.
© LES/PUC-Rio Forward Chaining – First Example The Vehicles Rule Base Cycle: IF num_wheels < 4 THEN vehicleType=cycle Automobile: IF num_wheels=4 AND motor=yes THEN vehicleType=automobile MiniVan: IF vehicleType=automobile AND size=medium AND num_doors=3 THEN vehicle=MiniVan...
© LES/PUC-Rio Forward Chaining – First Example Initial values in the working memory –num_wheels=4 –motor=yes –num_doors=3 –size=medium Cycle: IF num_wheels < 4 THEN vehicleType=cycle (Rule is false) Automobile: IF num_wheels=4 AND motor=yes THEN vehicleType=automobile
© LES/PUC-Rio Forward Chaining – First Example Values in the working memory –num_wheels=4 –motor=yes –num_doors=3 –size=medium –vehicleType=automobile MiniVan: IF vehicleType=automobile AND size=medium AND num_doors=3 THEN vehicle=MiniVan
© LES/PUC-Rio Forward Chaining – First Example Values in the working memory –num_wheels=4 –motor=yes –num_doors=3 –size=medium –vehicleType=automobile –vehicle=MiniVan
© LES/PUC-Rio Forward Chaining – Second Example Suppose that the goal is to conclude the color of my pet Fritz, given that he croaks and eats flies, and that the rule base contains the following two rules: –If Fritz croaks and eats flies - Then Fritz is a frog –If Fritz is a frog - Then Fritz is green croaks=true eats_flies=true croaks=true eats_flies=true Fritz=frog croaks=true eats_flies=true Fritz=frog green=true Working memory
© LES/PUC-Rio Forward Chaining Cycle 1 - Load the rule base into the inference engine and load any facts from the knowledge base into the working memory. 2 - Add any additional initial data into the working memory 3 - Match the rules against the data in the working memory which rules are triggered, meaning that all of their antecedent clauses are true. This set of triggered rules is called the conflict set. 4 – Use a procedure to select a single rule from the conflict set. 5 – Update the working memory. 6 – Repeat steps 3, 4 and 5 until the conflict set is empty.
© LES/PUC-Rio Backward Chaining A particular consequence or goal clause is evaluated first. Unlike forward chaining, which uses rules to produce new information, backward chaining uses rules to answer questions about whether a goal clause is true or not. It only processes rules that are relevant to the question.
© LES/PUC-Rio Backward Chaining - Example We go to work using a rule from our Vehicles rule base as an example. Cycle: IF num_wheels < 4 THEN vehicleType=cycle Automobile: IF num_wheels=4 AND motor=yes THEN vehicleType=automobile MiniVan: IF vehicleType=automobile AND size=medium AND num_doors=3 THEN vehicle=MiniVan...
© LES/PUC-Rio Backward Chaining - Example Suppose we want to find out whether the vehicle we have is a MiniVan. MiniVan: IF vehicleType=automobile AND size=medium AND num_doors=3 THEN vehicle=MiniVan We start with an empty working memory. To verify if vehicle=MiniVan in the work memory. If not, then all the antecedent clauses of the MiniVan=true: rule must be true.
© LES/PUC-Rio Backward Chaining - Example The first thing we do is test if vehicleType=automobile is true. The vehicleType variable has no value, so we look for a rule that has vehicleType=automobile in its consequence clause Automobile: IF num_wheels=4 AND motor=yes AND vehicleType=automobile We look num_wheels=4 in the work memory and if there is a rule related. There are none, so we ask the user.
© LES/PUC-Rio Backward Chaining - Example Working memory –num_wheels=4 –motor=yes –vehicleType=automobile Going back to our original rule MiniVan: IF vehicleType=automobile AND size=medium AND num_doors=3 THEN vehicle=MiniVan
© LES/PUC-Rio Backward Chaining - Example Working memory –num_wheels=4 –motor=yes –vehicleType=automobile –size=medium –num_doors=3 –vehicle=MiniVan
© LES/PUC-Rio Backward Chaining - Cycle 1 - Load the rule base into the inference engine and load any facts from the knowledge base into the working memory 2 - Add any additional initial data into the working memory 3 – Specify a goal variable for the inference engine to find 4 – Find the set rules that refer to the goal variable in a consequence clause. Put each rule on the goal stack 5 – Take the top rule off the goal stack 6 – Try to prove the rule is true by testing all antecedent clauses to see if they are true.
© LES/PUC-Rio JTP:An Object-Oriented Modular Reasoning System Knowledge Systems Laboratory of Computer Science Department in Stanford University JTP is based on a very simple and general reasoning architecture. Backward-chaining and forward chaining Reasoner is the principal functional component of the architecture. –process - This method attempts to find proof for the goal.
© LES/PUC-Rio Final Considerations Forward-chaining uses inference rules to extract more data. Backward chaining uses rules to answer questions about whether a goal clause is true or not. Very used in AI applications. APIs that use forward- and backward-chaining (ex: JTP).
© LES/PUC-Rio Bibliography Bigus, Joseph P.; Bigus, Jennifer, Constructing Intelligent Agents Using Java – Second Edition. Forward chaining - Wikipedia (2007), http://en.wikipedia.org/wiki/Forward_chaining, August. Forward chaining of Rules (2007), http://msdn2.microsoft.com/en-us/library/aa349441.aspx, August. Reasoning – Wikipedia (2007), http://en.wikipedia.org/wiki/Reasoning, August
© LES/PUC-Rio Bibliography Backward chaining – Wikipedia (2007) http://en.wikipedia.org/wiki/Backward_chaining, August. API JTP Web site (2007), http://www- ksl.stanford.edu/software/jtp/, August.
CPSC 433 Artificial Intelligence CPSC 433 : Artificial Intelligence Tutorials T01 & T02 Andrew “M” Kuipers note: please include.
Forward and Backward Chaining. Rule-Based Systems Instead of representing knowledge in a relatively declarative, static way (as a bunch of things that.
Reasoning System. Reasoning with rules Forward chaining Backward chaining Rule examples Fuzzy rule systems Planning.
THIS CD HAS BEEN PRODUCED FOR TEACHERS TO USE IN THE CLASSROOM. IT IS A CONDITION OF THE USE OF THIS CD THAT IT BE USED ONLY BY THE PEOPLE FROM SCHOOLS.
‘In which we introduce a logic that is sufficent for building knowledge- based agents!’
Artificial Intelligence Lecture No. 16 Dr. Asad Ali Safi Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Logic. Knowledge-based agents Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
Logical Agents Knowledge-Based Agents Logic Propositional Logic Summary.
Chapter 5 Expert System Artificial Intelligence Dr.Hassan Al-Tarawneh.
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Reasoning Automated Deduction. Reasonable Arguments Argument: An attempt to demonstrate the truth of a conclusion from the truth of a set of premises.
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.
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
© C. Kemke1Reasoning - Introduction COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
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.
Chapter 12: Expert Systems Design Examples Expert Systems: Principles and Programming, Fourth Edition.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007 Knowledge and reasoning (Ch 7) Propositional logic 1.
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.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
13: Inference Techniques Reasoning with AI Forward and Backward Inference Tree Frames Model-Based Case-Based Explanation, Metaknowledge Uncertainty.
CS 484 – Artificial Intelligence1 Announcements Choose Research Topic by today Project 1 is due Thursday, October 11 Midterm is Thursday, October 18 Book.
EXPERT SYSTEMS Part I. 2 What is there in an expert system? Components of an expert system Components of an expert system Knowledge acquisition and knowledge.
1 Rule Based Systems Introduction to Production System Architecture.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Fall 2005.
Expert Systems Reasonable Reasoning An Ad Hoc approach.
Artificial Intelligence Chapter 17 Knowledge-Based Systems Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
1 Logic Use mathematical deduction to derive new knowledge. Predicate Logic is a powerful representation scheme used by many AI programs. Propositional.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Basic Terms in Logic Michael Jhon M. Tamayao. Learning Objectives Identify and define the basic terms in Logic. Differentiate the terms according to their.
Knowledge Acquisition. Concepts of Knowledge Engineering Knowledge engineering The engineering discipline in which knowledge is integrated into computer.
The Basics of Logical Argument Two Kinds of Argument The Deductive argument: true premises guarantee a true conclusion. e.g. All men are mortal. Socrates.
Artificial Intelligence CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi Arabia
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2005.
1 Knowledge Representation Introduction KR and Logic.
Logic: The Big Picture Propositional logic: atomic statements are facts –Inference via resolution is sound and complete (though likely computationally.
1 Backward-Chaining Rule-Based Systems Elnaz Nouri December 2007.
1 CHAPTER 13 Decision Support Systems and Intelligent Systems, Efraim Turban and Jay E. Aronson 6th ed, Copyright 2001, Prentice Hall, Upper Saddle River,
Chapter 14: Artificial Intelligence Invitation to Computer Science, C++ Version, Third Edition.
1 Unification ( 統一 ) Forward Chaining ( 前向き仮説推理 ) Backward Chaining ( 後ろ向き仮説推理 ) Unification ( 統一 ) Forward Chaining ( 前向き仮説推理 ) 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.
Framing an Experimental Hypothesis WP5 Professor Alan K. Outram University of Exeter 8 th October 2012.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
© 2017 SlidePlayer.com Inc. All rights reserved.