Skip to main content

Knowledge, reasoning; forward chaining

Short answer

Knowledge is domain facts/rules; representation encodes it (logic, rules, frames); reasoning derives conclusions. Forward chaining is data-driven: start with facts, fire rules whose conditions match, add conclusions, repeat until goal or no rules fire. Example: facts Tom has fur, meows, eats meat; rules derive cat, mammal, carnivore.

What is knowledge, representation and reasoning? Describe forward chaining with practical example.

Knowledge, representation and reasoning

  • Knowledge is the facts, rules and relationships about a domain that an intelligent system uses to solve problems.
  • Knowledge representation (KR) is the way knowledge is encoded in a form a computer can store and use, e.g. propositional logic, FOPL, semantic networks, frames, production rules.
  • Reasoning is the process of using the represented knowledge to draw new conclusions, answer queries and make decisions (deduction, induction, abduction; forward and backward chaining).

Forward chaining

Forward chaining is a data-driven inference method. It starts from the known facts, finds rules whose conditions (IF part) are satisfied by the facts, fires them to add their conclusions (THEN part) as new facts, and repeats until the goal is derived or no more rules can fire.

Repeat:
   find all rules whose IF-part matches the facts
   pick one (conflict resolution), add its THEN-part
Until goal is in facts or no rule fires

Example

Rules:

  • R1: IF X has fur AND X says meow THEN X is a cat
  • R2: IF X is a cat THEN X is a mammal
  • R3: IF X is a mammal AND X eats meat THEN X is a carnivore

Facts: Tom has fur; Tom says meow; Tom eats meat.

CycleRule that firesNew fact
1R1 (fur and meow are facts)Tom is a cat
2R2 (cat is a fact)Tom is a mammal
3R3 (mammal and eats meat)Tom is a carnivore

No more rules can fire. Conclusion: Tom is a carnivore. If the question were "Is Tom a carnivore?", the system stops at cycle 3 because the goal is derived.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Artificial Intelligence chapter 4 questions →