Uploaded by Siddarth gaming

forward chaining (2)

advertisement
Forward Chaining
• Given a new fact, generate all consequences
• Assumes all rules are of the form
– C1 and C2 and C3 and…. --> Result
•
•
•
•
Each rule & binding generates a new fact
This new fact will “trigger” other rules
Keep going until the desired fact is generated
(Semi-decidable as is FOL in general)
Properties of ForwardChaining
• It is a down-up approach, as it moves from
bottom to top.
• It is a process of making a conclusion based on
known facts or data, by starting from the initial
state and reaches the goal state.
• Forward-chaining approach is also called as
data-driven as we reach to the goal using
available data.
• Forward -chaining approach is commonly used in
the expert system
FC: Example Knowledge Base
• The law says that it is a crime for an
American to sell weapons to hostile
nations. The country Nono, an enemy
America, has some missiles, and all of its
missiles were sold to it by Col. West, who
is an American.
• Prove that Col. West is a criminal.
FC: Example Knowledge Base
• …it is a crime for an American to sell weapons to hostile
nations
American(x) Weapon(y) enemy(z, America) Sells(x,y,z)  Criminal(x)
• Nono…has some missiles
Ml Owns(Nono, MI)
Missiles(MI)
• …all of its missiles were sold to it by Col. West
MI: Missle(MI)  Owns(Nono, MI)  Sells( West, MI, Nono)
• Missiles are weapons
Missle(MI)  Weapon(MI)
FC: Example Knowledge Base
• Col. West who is an American
American( Col. West )
• The country Nono, an enemy of America
Enemy(Nono, America)
FC: Example Knowledge Base
FC: Example Knowledge Base
FC: Example Knowledge Base
Efficient Forward Chaining
• Order conjuncts appropriately
– E.g. most constrained variable
• Don’t generate redundant facts; each new
fact should depend on at least one newly
generated fact.
Backward Chaining
• It is known as a top-down approach.
• Backward-chaining is based on modus ponens
inference rule.
• In backward chaining, the goal is broken into
sub-goal or sub-goals to prove the facts true.
• It is called a goal-driven approach, as a list of
goals decides which rules are selected and used.
• Backward -chaining algorithm is used in game
theory, automated theorem proving tools,
inference engines
Backward Chaining Example
Backward Chaining Example
Backward Chaining Example
Backward Chaining Example
Backward Chaining Example
Backward Chaining Example
Backward Chaining Example
Download