Artificial Intelligence ยท Unit 5
Reasoning and Inference
Exam-focused notes for Reasoning and Inference (Artificial Intelligence, BIT252): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.
Reasoning and Inference in short
Reasoning is how an agent derives new facts from what it knows. This chapter covers inference rules, chaining, resolution, constraint satisfaction, and decision making in games.
What this unit covers
- Rules of inference
- Forward chaining
- Backward chaining
- Resolution method
- Constraint satisfaction problems
- Game theory and minimax algorithm
Backward chaining
2080 ยท 5 marks
Distinguish between backward chaining and forward chaining with an example. [5]
Show solved answerHide answer
Backward Chaining vs Forward Chaining
Forward Chaining (Data-Driven Reasoning)
Forward chaining starts from known facts and applies inference rules to derive new facts, moving forward toward the goal.
- It is a bottom-up approach
- Begins with available data/facts
- Fires rules whose conditions are satisfied
- Continues until the goal is reached or no more rules can fire
- Used when: all data is available and we want to derive conclusions
Backward Chaining (Goal-Driven Reasoning)
Backward chaining starts from the goal and works backward to find the facts that support it.
- It is a top-down approach
- Begins with the goal to be proved
- Breaks the goal into sub-goals
- Continues until all sub-goals are satisfied by known facts
- Used when: the goal is clear and we want to verify it
Key Differences
| Feature | Forward Chaining | Backward Chaining |
|---|---|---|
| Direction | Facts โ Goal | Goal โ Facts |
| Approach | Bottom-up | Top-down |
| Driven by | Data | Goal |
| Starting point | Known facts | Hypothesis/Goal |
| Usage | When facts are given | When goal is specific |
| May derive | Irrelevant conclusions | Only goal-relevant facts |
| Example system | CLIPS | Prolog |
Example
Given Rules and Facts:
- Fact 1: It is raining
- Fact 2: I have an umbrella
- Rule 1: If it is raining AND I have an umbrella โ I will not get wet
- Rule 2: If I will not get wet โ I will go outside
- Goal: Will I go outside?
Forward Chaining Solution:
Start with known facts: {raining, have umbrella}
Step 1: Rule 1 fires (raining + have umbrella)
โ Derive: "will not get wet"
Step 2: Rule 2 fires (will not get wet)
โ Derive: "will go outside"
Goal REACHED: Yes, I will go outside.
Backward Chaining Solution:
Start with Goal: "Will I go outside?"
Step 1: To prove "go outside", need Rule 2
โ Sub-goal: Prove "will not get wet"
Step 2: To prove "will not get wet", need Rule 1
โ Sub-goals: Prove "raining" AND "have umbrella"
Step 3: Check facts:
"raining" โ TRUE (known fact)
"have umbrella" โ TRUE (known fact)
Goal PROVED: Yes, I will go outside.
Summary
Forward chaining is suitable when we have a set of facts and want to derive all possible conclusions. Backward chaining is suitable when we have a specific goal and want to verify whether it can be supported by existing facts. Both are fundamental inference strategies used in expert systems and AI rule-based reasoning.
Rules of inference
0 ยท 5 marks
All living things are either animal or plant. All animals who can bark are dogs. Puppy is living thing and it is not a plant. Using rules of inference show that Puppy can bark. [5]
Game theory and minimax algorithm
0 ยท 5 marks
What does alpha and beta refer in min max algorithm? Write the script for a shopping at department store? [5]
Make Unit 5 stick
Practice BIT252 with flashcards & quizzes