Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
54 views8 pages

Forward and Backward Chaining

The document discusses two search strategies in problem-solving: data-driven (forward chaining) and goal-driven (backward chaining). Data-driven search starts with known facts and applies rules to generate new facts until a goal is reached, while goal-driven search begins with a goal and works backward through subgoals to find supporting facts. The choice between these strategies depends on the problem's structure, including the availability of data and the complexity of rules.

Uploaded by

not.achillperson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views8 pages

Forward and Backward Chaining

The document discusses two search strategies in problem-solving: data-driven (forward chaining) and goal-driven (backward chaining). Data-driven search starts with known facts and applies rules to generate new facts until a goal is reached, while goal-driven search begins with a goal and works backward through subgoals to find supporting facts. The choice between these strategies depends on the problem's structure, including the availability of data and the complexity of rules.

Uploaded by

not.achillperson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Data-Driven and Goal-Driven Search

A state space may be searched in two directions: from the given data of a problem instance
toward a goal or from a goal back to the data.
In data-driven search, sometimes called forward chaining, the problem solver begins with the
given facts of the problem and a set of legal moves or rules for changing state. Search proceeds
by applying rules to facts to produce new facts, which are in turn used by the rules to generate
more new facts. This process continues until it generates a path that satisfies the goal condition.
In goal-driven search, the problem solver begins with the goal that we want to solve and check
what rules or legal moves could be used to generate this goal and determine what conditions
must be true to use them. These conditions become the new goals, or subgoals, for the search.
Search continues, working backward through successive subgoals until it works back to the
facts of the problem. This finds the chain of moves or rules leading from data to a goal, although
it does so in backward order. This approach is called backward chaining.
To summarize, data-driven search takes the facts of the problem and applies the rules or legal
moves to produce new facts that lead to a goal; goal-driven search focuses on the goal, finds
the rules that could produce the goal, and chains backward through successive rules and
subgoals to the given facts of the problem. Both data-driven and goal-driven problem solvers
search the same state space graph; however, the order and actual number of states searched can
differ. The preferred strategy is determined by the properties of the problem itself. These
include the complexity of the rules, the “shape” of the state space, and the nature and
availability of the problem data. All of these vary for different problems.

Abhishek Dey
Assistant Professor
Department of Computer Science
Bethune College, Kolkata
Forward chaining and backward chaining have been used extensively in Expert Systems. In
artificial intelligence, an expert system is a computer system emulating the decision-making
ability of a human expert. Expert systems are designed to solve complex problems by reasoning
through bodies of knowledge, represented mainly as if–then rules. An expert system is divided
into two subsystems: the inference engine and the knowledge base. The knowledge base
represents facts and rules. The inference engine applies the rules to the known facts to deduce
new facts. Inference engines can also include explanation and debugging abilities.

With forward chaining, an expert system is able to answer the question “What can happen
next?” By following a chain of conditions and derivations, the expert system deduces the
outcome after considering all facts and rules. It then sorts them before arriving at a conclusion
in terms of the suitable solution. This strategy is followed while working on conclusion, result,
or effect. For example, predicting how does the share market prediction of share market will
react to the changes in the interest rates. Backward chaining is used by an expert system to
answer the question “Why did this happen?” Depending upon what has already occurred, the
inference engine tries to identify the conditions that could have happened in the past to trigger
the final result. This strategy is used to find the cause or the reason behind something
happening. For example, the diagnosis of different types of cancer in humans.

Abhishek Dey
Assistant Professor
Department of Computer Science
Bethune College, Kolkata
Forward chaining: an example

Abhishek Dey
Assistant Professor
Department of Computer Science
Bethune College, Kolkata
Backward chaining: an example

Abhishek Dey
Assistant Professor
Department of Computer Science
Bethune College, Kolkata
Abhishek Dey
Assistant Professor
Department of Computer Science
Bethune College, Kolkata
Another Example:

Solve Yourself:
Observed Animal - Toby
Features of Toby -
• Covered body with "hairs"
• Extremities of the legs is "nails"
• Nature of the neck is "long"
• Nature of legs is "long"
• Color is "brown"
• Dress is "black rayes”
Toby is a ______?

Abhishek Dey
Assistant Professor
Department of Computer Science
Bethune College, Kolkata
The decision to choose between data- and goal-driven search is based on the structure
of the problem to be solved.

Data-driven search is appropriate for problems in which:


1. All or most of the data are given in the initial problem statement. Interpretation problems
often fit this approach by presenting a collection of data and asking the system to provide a
high-level interpretation. Systems that analyse particular data (e.g., the PROSPECTOR or
Dipmeter programs, which interpret geological data or attempt to find what minerals are likely
to be found at a site) fit the data-driven approach.
2. There are a large number of potential goals, but there are only a few ways to use the facts
and given information of a particular problem instance.
3. It is difficult to form a goal or hypothesis.

Goal-driven search is suggested if:


1. A goal or hypothesis is given in the problem statement or can easily be formulated. For
example, many diagnostic systems consider potential diagnoses in a systematic fashion,
confirming or eliminating them using goal-driven reasoning.
2. There are a large number of rules that match the facts of the problem and thus produce an
increasing number of conclusions or goals. Early selection of a goal can eliminate most of these
branches, making goal-driven search more effective in pruning the space.
3. Problem data are not given but must be acquired by the problem solver. In this case, goal-
driven search can help guide data acquisition. In a medical diagnosis program, for example, a
wide range of diagnostic tests can be applied. Doctors order only those that are necessary to
confirm or deny a particular hypothesis.

Abhishek Dey
Assistant Professor
Department of Computer Science
Bethune College, Kolkata
Difference of Forward Chaining and Backward Chaining:

Forward Chaining Backward Chaining


Forward chaining starts from known facts Backward chaining starts from the goal and
and applies inference rule to extract more works backward through inference rules to find
data unit it reaches to the goal. the required facts that support the goal.
Forward chaining is known as data-driven Backward chaining is known as goal-driven
inference technique as we reach to the goal technique as we start from the goal and divide
using the available data. into sub-goal to extract the facts.
Forward chaining reasoning applies a Backward chaining reasoning applies a depth-
breadth-first search strategy. first search strategy.
Forward chaining tests for all the available Backward chaining only tests for few required
rules rules.
Forward chaining is suitable for the
Backward chaining is suitable for diagnostic,
planning, monitoring, control, and
prescription, and debugging application.
interpretation application.
Forward chaining is aimed for any Backward chaining is only aimed for the
conclusion. required data.

References:

➢ Artificial Intelligence: Structures and Strategies for Complex Problem Solving by George
Luger

➢ https://www.mygreatlearning.com/blog/expert-systems-in-artificial-intelligence/

Abhishek Dey
Assistant Professor
Department of Computer Science
Bethune College, Kolkata

You might also like