Forward Chaining and Backward Chaining
Forward Chaining and Backward Chaining
chaining
• Inference engine:
• 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:
• Forward chaining
• Backward chaining
Horn Clause and Definite clause:
• Horn clause and definite clause are the forms of sentences, which
enables knowledge base to use a more restricted and efficient
inference algorithm. Logical inference algorithms use forward and
backward chaining approaches, which require KB in the form of
the first-order definite clause.
• Definite clause: A clause which is a disjunction of literals
with exactly one positive literal is known as a definite clause or
strict horn clause.
• Horn clause: A clause which is a disjunction of literals with at most
one positive literal is known as horn clause. Hence all the definite
clauses are horn clauses.
• Example: (¬ p V ¬ q V k). It has only one positive literal k.
• It is equivalent to p ∧ q → k.
A. Forward Chaining
• Step-1:
• Step-2:
• Step 3: In step 3 we can check the given
statement that needs to be checked and check
whether it is satisfied with the substitution
which infers all the previously stated facts.
Thus we reach our goal.
Backward Chaining
•
• Step 3: At step-3, we will extract further facts
which infers from facts inferred in step 2.
•
• Step 4: We’ll repeat the same until we get to a
certain fact that satisfies the conditions.
•
• Step 5:
• Once all the facts and conditions have been derived, the iteration process
stops.