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
© 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), August. Forward chaining of Rules (2007), August. Reasoning – Wikipedia (2007), August
© LES/PUC-Rio Bibliography Backward chaining – Wikipedia (2007) August. API JTP Web site (2007), ksl.stanford.edu/software/jtp/, August.
STRONG METHOD PROBLEM SOLVING. Human experts are able to perform at a high level because they know a lot about their areas of expertise. This fact is.
Of An Expert System. Introduction What is AI? Intelligent in Human & Machine? What is Expert System? How are Expert System used? Elements of ES Who are.
1 Knowledge Representation Introduction KR and Logic.
Artificial Intelligence Dr. Eng. Ahmed Moustafa Elmahalawy Computer Science and Engineering Department.
Planning. Components of a Planning System In any general problem solving systems, elementary techniques to perform following functions are required –Choose.
ICT2191 Topic 6 Knowledge representation, rule- based systems Steering around obstacles Knowledge Representation – Basics Knowledge Representation – Some.
Introduction to knowledge management. What is knowledge management Knowledge management can be difficult to define, because it encompasses a wide range.
Chapter 5 Information Processing and Utilization Section 3 Theorem Proving.
1 Artificial Intelligence First-Order Logic Inference in First-Order Logic.
Reason and Argument Induction (Part of Ch. 9 and part of Ch. 10)
An ISO 9001:2008 Certified Organization PCTI Group Artificial Intelligence.
The. of and a to in is you that it he for.
CS 460, Session Inference in First-Order Logic Proofs Unification Generalized modus ponens Forward and backward chaining Completeness Resolution.
Revised By: Ghulam Irtaza Sheikh Aman Ullah Khan A.I. IS THE FUTURE OF COMPUTING!
Introduction to Logic and Prolog Sabu Francis, B.Arch (Hons)
Basic Terms in Logic Michael Jhon M. Tamayao. Learning Objectives Identify and define the basic terms in Logic. Differentiate the terms according to their.
Formal Criteria for Evaluating Arguments Validity and Soundness.
Expert System Seyed Hashem Davarpanah University of Science and Culture.
Knowledge-based systems Rozália Lakner University of Veszprém Department of Computer Science.
1 Logic Inference Chapter 7.5, 9 CMSC 471 Adapted from slides by Tim Finin and Marie desJardins. Some material adopted from notes by Andreas Geyer-Schulz,
Intelligent Architectures for Electronic Commerce Part 1.5: Symbolic Reasoning Agents.
© 2002 Franz J. Kurfess Logic and Reasoning 1 CPE/CSC 481: Knowledge-Based Systems Dr. Franz J. Kurfess Computer Science Department Cal Poly.
Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
9.1 9 Programmin g Languages Foundations of Computer Science Cengage Learning.
Chapter: The Nature of Science Table of Contents Section 3: Models in ScienceModels in Science Section 1: What is science? Section 2: Science in ActionScience.
Unit-V -SOFTWARE QUALITY. To develop and deliver robust system, we need a high level of confidence that Each component will behave correctly Collective.
Chapter 4 Slide 1 Original 33 slides by Prof. Anita Beecroft, Kwantlen Polytechnic University 16 slides added Feb 2011 by Prof. Tim Richardson, University.
CS 461: Artificial Intelligence Introduction Instructor: Sayera Hafsa.
First-Order Logic (FOL) aka. predicate calculus Tuomas Sandholm Carnegie Mellon University Computer Science Department.
Chapter 1: Introduction to Expert Systems. 2 Objectives Learn the meaning of an expert system Understand the problem domain and knowledge domain Learn.
© 2016 SlidePlayer.com Inc. All rights reserved.