EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials Machine Learning Tutorial Forward and Backward Chaining
Secondary Sidebar
Machine Learning Tutorial
  • Classification
    • Kernel Methods in Machine Learning
    • Clustering in Machine Learning
    • Machine Learning Architecture
    • Automation Anywhere Architecture
    • Machine Learning C++ Library
    • Machine Learning Frameworks
    • Data Preprocessing in Machine Learning
    • Data Science Machine Learning
    • Classification of Neural Network
    • Neural Network Machine Learning
    • What is Convolutional Neural Network?
    • Single Layer Neural Network
    • Kernel Methods
    • Forward and Backward Chaining
    • Forward Chaining
    • Backward Chaining
  • Basic
    • Introduction To Machine Learning
    • What is Machine Learning?
    • Uses of Machine Learning
    • Applications of Machine Learning
    • Naive Bayes in Machine Learning
    • Dataset Labelling
    • DataSet Example
    • Deep Learning Techniques
    • Dataset ZFS
    • Careers in Machine Learning
    • What is Machine Cycle?
    • Machine Learning Feature
    • Machine Learning Programming Languages
    • What is Kernel in Machine Learning
    • Machine Learning Tools
    • Machine Learning Models
    • Machine Learning Platform
    • Machine Learning Libraries
    • Machine Learning Life Cycle
    • Machine Learning System
    • Machine Learning Datasets
    • Machine Learning Certifications
    • Machine Learning Python vs R
    • Optimization for Machine Learning
    • Types of Machine Learning
    • Machine Learning Methods
    • Machine Learning Software
    • Machine Learning Techniques
    • Machine Learning Feature Selection
    • Ensemble Methods in Machine Learning
    • Support Vector Machine in Machine Learning
    • Decision Making Techniques
    • Restricted Boltzmann Machine
    • Regularization Machine Learning
    • What is Regression?
    • What is Linear Regression?
    • Dataset for Linear Regression
    • Decision tree limitations
    • What is Decision Tree?
    • What is Random Forest
  • Algorithms
    • Machine Learning Algorithms
    • Apriori Algorithm in Machine Learning
    • Types of Machine Learning Algorithms
    • Bayes Theorem
    • AdaBoost Algorithm
    • Classification Algorithms
    • Clustering Algorithm
    • Gradient Boosting Algorithm
    • Gradient Descent in Machine Learning
    • Mean Shift Algorithm
    • Hierarchical Clustering Algorithm
    • Hierarchical Clustering Agglomerative
    • What is a Greedy Algorithm?
    • What is Genetic Algorithm?
    • Random Forest Algorithm
    • Nearest Neighbors Algorithm
    • Weak Law of Large Numbers
    • Ray Tracing Algorithm
    • SVM Algorithm
    • Naive Bayes Algorithm
    • Neural Network Algorithms
    • Boosting Algorithm
    • XGBoost Algorithm
    • Pattern Searching
    • Loss Functions in Machine Learning
    • Decision Tree in Machine Learning
    • Hyperparameter Machine Learning
    • Unsupervised Machine Learning
    • K- Means Clustering Algorithm
    • KNN Algorithm
    • Monty Hall Problem
  • Supervised
    • What is Supervised Learning
    • Supervised Machine Learning
    • Supervised Machine Learning Algorithms
    • Perceptron Learning Algorithm
    • Simple Linear Regression
    • Polynomial Regression
    • Multivariate Regression
    • Regression in Machine Learning
    • Hierarchical Clustering Analysis
    • Linear Regression Analysis
    • Support Vector Regression
    • Multiple Linear Regression
    • Linear Algebra in Machine Learning
    • Statistics for Machine Learning
    • What is Regression Analysis?
    • Clustering Methods
    • Backward Elimination
    • Ensemble Techniques
    • Bagging and Boosting
    • Linear Regression Modeling
    • What is Reinforcement Learning
  • Deep Learning
    • What Is Deep learning
    • Overviews Deep Learning
    • Application of Deep Learning
    • Careers in Deep Learnings
    • Deep Learning Frameworks
    • Deep Learning Model
    • Deep Learning Algorithms
    • Deep Learning Technique
    • Deep Learning Networks
    • Deep Learning Libraries
    • Deep Learning Toolbox
    • Types of Neural Networks
    • Convolutional Neural Networks
    • Create Decision Tree
    • Deep Learning for NLP
    • Caffe Deep Learning
    • Deep Learning with TensorFlow
  • RPA
    • What is RPA
    • What is Robotics?
    • Benefits of RPA
    • RPA Applications
    • Types of Robots
    • RPA Tools
    • Line Follower Robot
    • What is Blue Prism?
    • RPA vs BPM
  • Interview Questions
    • Deep Learning Interview Questions And Answer
    • Machine Learning Cheat Sheet

Forward and Backward Chaining

By Priya PedamkarPriya Pedamkar

Forward-and-Backward-Chaining

Introduction to Forward and Backward Chaining

Forward and Backward Chaining are the modes used by the Inference Engine to deduce new information from the knowledge base. Inference Engine is one of the major components of the intelligent system in Artificial Intelligence that applies a set of logical rules to the existing information (Knowledge Base) to deduce new information from the already known fact. Forward and Backward Chaining are the two modes by which Inference engine deduce new information. Forward and Backward Propagation are exactly opposite of each other in the manner they deduce new information from the known facts.

How Forward Propagation Works?

Forward Chaining known by some as forward reasoning or forward deduction starts with the known fact or atomic sentence in the knowledge base and gradually inference rules are applied to the already known facts till we reach the goal state. In a nutshell, forward chaining makes a decision or reach the goal state based on the available data.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

Properties of Forward Chaining

  • It follows a bottom-up approach i.e. the reasoning deduction moves from bottom to the top
  • It is also called a Data-driven approach as it relies on existing data to reach the goal state
  • It is conclusion driven i.e. its objective is to reach the conclusion from the initial state
  • It is widely used in the Expert System like CLIPS and Production rule system

Example

Let’s look at an example to understand how Forward Chaining works in practice

Rule 1: IF A is human THEN A is mammal

Rule 2: IF A is a mammal THEN A is a living form

Rule 3: IF A is a living form THEN A is mortal

Fact: Shyam is human

From these inference rules, we have to reach the Goal

Goal: Is Shyam a mortal?

Steps:

  1. Start with the Known fact. We know that Shyam is human (From the Fact statement).
  2. Using R1 we can infer that Shyam is a mammal. Since it is not a Goal Statement so continue.
  3. Then jump to Rule 2: if Shyam is a mammal then it as a living form so we can say that Murat is a living form. Since it is not a Goal Statement so continue
  4. Using R3, Since Shyam is a life form so it must be Mortal. Since it is the goal statement so Exit

Advantages of Forward Chaining

  • Forward Chaining works great when the available information can be used to reach the goal state
  • Forward Chaining has the ability to provide lots of data from the limited initial data
  • Forward Chaining is best suited for Expert system application that requires more control, planning, and monitoring
  • Forward Chaining should be applied when there are a limited number of initial states or facts

Disadvantages of Forward Chaining

  • The inference engine will generate new information without knowing which information will be relevant in reaching the goal state
  • The user might have to enter a lot of information initially without knowing which information will be used to reach the goal state
  • Inference Engine may fire many rules which don’t contribute toward reaching the goal state
  • It might give different conclusion which may result in the high cost of the chaining process

How Backward Propagation works?

Backward Chaining or Backward Propagation is the reverse of Forward Chaining. It starts from the goal state and propagates backwards using inference rules so as to find out the facts that can support the goal. It is also called as Goal-Driven reasoning. It starts from the given goal, searches for the THEN part of the rule (action part) if the rule is found and its IF part matches the Inference Rule then the rule is executed other Inference Engine set it as a new subgoal.

Rule 1: IF A AND B THEN C

Rule 2: IF C THEN E

Rule 3: IF A AND E THEN H

Facts: A, B

Goal: Prove H

Proof:

Step 1: At first system looks for the statement that has goal on the R.H.S i.e. R3 then look for the L.H.S of the rule to check if it contains the fact. It contains A and E but we need B also

Step 2: Now it will have E as the sub goal which is proved by Rule 2. Now look at its L.H.S i.e. C

Step 3: C can be proved by Rule 1 which has A & B as the L.H.S

Step 4: Since we got bot the facts A&B from the goal so the Algorithm end here

Step 5: Stop

Properties of Backward Chaining

  • Backward Chaining is a top-down approach where we start from the goal state and works backwards to find the required facts that support the goal statement
  • It is known as Goal-driven approach as we start from the goal and then divide into sub-goal to extract the facts
  • It applies the Depth-First search strategy
  • It can only generate a limited number of conclusions
  • It only tests for few of the required rules

Advantages of Backward Chaining

  • The search in backward chaining is directed so the processing terminates when the fact is verified
  • Backward Chaining consider only relevant parts of knowledge base so it never performs unnecessary inferences
  • Unlike Forward Chaining, here only a few data points are needed but rules are searched exhaustively
  • It is very efficient for problems like diagnosing and debugging

Disadvantages

  • Since backward chaining is goal-driven, so the goal must be known beforehand to perform backward chaining
  • It is difficult to implement backward chaining

Conclusion – Forward and Backward Chaining

Rule-Based System is pertinent to human’s daily life so it is imperative to have understanding of these system. Both the modes involved in Rule-based systems come with its own sets of advantages and disadvantage. The selection of the approach depends on the nature of the problem.

Recommended Articles

This has been a guide to Forward and Backward Chaining. Here we discuss the properties, examples, advantages, and disadvantages of forward and backward chaining. You may also have a look at the following articles to learn more –

  1. Forward Chaining vs Backward Chaining
  2. Networking Devices
  3. Cheat sheet JQuery
  4. jQuery Elements
Popular Course in this category
Machine Learning Training (20 Courses, 29+ Projects)
  19 Online Courses |  29 Hands-on Projects |  178+ Hours |  Verifiable Certificate of Completion
4.7
Price

View Course

Related Courses

Deep Learning Training (18 Courses, 24+ Projects)4.9
Artificial Intelligence AI Training (5 Courses, 2 Project)4.8
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more