Forward & Backward Chainning
Forward & Backward Chainning
Forward & Backward Chainning
The inference engine is the component of the intelligent system in artificial intelligence,
which applies logical rules to the knowledge base to infer new information from known facts.
The first inference engine was part of the expert system. Inference engine commonly
proceeds in two modes, which are:
A. Forward chaining
B. Backward chaining
Forward Chaining
The Forward-chaining algorithm starts from known facts, triggers all rules whose
premises are satisfied, and add their conclusion to the known facts. This process
repeats until the problem is solved.
Properties of Forward-Chaining:
First of all we divide the above statements into separate sentences to convert easily
into FOL (first order logic). You can directly convert these statements into FOL
It is crime for an American to sell weapons to the enemy of America (Let's say x,
y, and z are variables)
Enemy(Nono, America)
Owns(Nono, x)
All the missiles were sold to Nono by colonel
Colonel is an American
American (Colonel)
In the first step we will start with the known facts and will choose the sentences
which do not have implications, such as: American(Colonel), Enemy(Nono,
America), Owns(Nono, x), and Missile(x).
Example
We will take the same example as above and will convert the facts in FOL
It is crime for an American to sell weapons to the enemy of America (Let's say x,
y, and z are variables)
Enemy(Nono, America)
Owns(Nono, x)
All the missiles were sold to Nono by colonel
Colonel is an American
American (Colonel)
Backward-Chaining proof
At the first step, we will take the goal fact. And from the goal fact, we will infer
other facts, and at last, we will prove those facts true. So our goal fact is "Colonel
is Criminal”
Difference between Forward Chaining and Backward chaining
1. Forward chaining starts from Backward chaining starts from the goal and
known facts and applies works backward through inference rules to
inference rule to extract more find the required facts that support the goal.
data unit it reaches to the
goal.
5. Forward chaining tests for all Backward chaining only tests for few
the available rules required rules.
9. Forward chaining is aimed for Backward chaining is only aimed for the
any conclusion. required data.