Backward chaining
A backward chaining (ger .: backward chaining ) referred to in the logic one inference - or inference strategy of the form:
wenn Bedingung, dann Faktum
The opposite model is the forward chaining . These chains are important, for example, in the field of artificial intelligence for inference machines .
As with forward chaining, backward chaining is based on a transitive combination of rules . However, one starts with the target object and only checks the rules that have the target in the conclusion . If the value of an object is unknown in the premise of such a rule, an attempt is made to derive this from other rules. If this does not succeed, the value is finally requested from the user.
This process is also called goal-oriented inference . A related inference strategy is forward chaining .
Example of a backward-chaining rule interpreter
Working memory: X, Y, Z
Standard knowledge base:
- X, Y -> S
- S, Z -> T
- S, Y -> A
- Y, T -> B
- X, T -> C
Goal: C is in memory
Conflict resolution:
- Only use rules that write the symbol you are looking for into memory
- If these rules are not yet applicable, make them applicable (sub-goal)
Possible solution:
step | random access memory | Objective: C |
---|---|---|
1 | X, Y, Z | Rule 5: X, T -> C |
2 | X, Y, Z | Sub-goal 1: X (in memory) |
3 | X, Y, Z | Sub-goal 2: T |
4th | X, Y, Z | Rule 2: S, Z -> T |
5 | X, Y, Z | Sub-goal 3: S |
6th | X, Y, Z | Rule 1: X, Y -> S |
7th | X, Y, Z | Sub-goal 4: X (in memory) |
8th | X, Y, Z, S | Sub-goal 5: Y (in memory) |
9 | X, Y, Z, S, T, C | Sub-goal 6: Z (in memory) |
If you read the solution from "bottom to top", you will reach the goal: "C in memory".