AI Notes
Complete reasoning guide. Inference engines, chaining. AI 2024.
What Are Reasoning Systems?
A reasoning system is an AI component that draws conclusions from available knowledge by applying logical rules, heuristics, or probabilistic methods. It takes existing facts and relationships and derives new information that was not explicitly stated—the hallmark of intelligent behavior.
Reasoning systems form the cognitive core of AI applications: expert systems reason about diagnoses, planning systems reason about action sequences, and natural language systems reason about meaning and intent. Understanding different reasoning paradigms—deductive, inductive, abductive, and analogical—is essential for designing AI that can think beyond its explicit programming.
Types of Reasoning
Deductive Reasoning (Certain Conclusions)
Moves from general rules to specific conclusions. If premises are true, conclusions are guaranteed true.
| Rule | All mammals have hearts. |
| Fact | A dog is a mammal. |
| Conclusion | A dog has a heart. (100% certain) |
| Formal: ∀x(Mammal(x) | HasHeart(x)), Mammal(dog) ⊢ HasHeart(dog) |
Deduction preserves truth but never adds new information beyond what's logically implicit in the premises.
Inductive Reasoning (Probable Conclusions)
Moves from specific observations to general rules. Conclusions are probable but not guaranteed.
| Observation | Swan 1 is white. |
| Observation | Swan 2 is white. |
| Observation | Swan 1000 is white. |
| Induction | All swans are white. (probably, but black swans exist!) |
| Strength depends on | sample size, diversity, absence of counterexamples |
Abductive Reasoning (Best Explanation)
Infers the most likely cause from observed effects. Used heavily in diagnosis.
| Observation | The lawn is wet. |
| Possible causes | (a) It rained, (b) Sprinkler was on, (c) Pipe burst |
| Abductive choice | It rained (most common, simplest explanation) |
| Formal: B is observed. A | B is known. Therefore A is likely. |
| Note | NOT logically valid! (affirming the consequent) But practically useful. |
Analogical Reasoning
Transfers knowledge from a known situation to a similar unknown one.
| Known | Drug X treats disease A by blocking receptor R. |
| Similar | Disease B also involves receptor R. |
| Analogy | Drug X might treat disease B. |
| Strength depends on | relevance of shared features, |
Monotonic vs. Non-Monotonic Reasoning
Monotonic Reasoning
Adding new information never invalidates previous conclusions:
| KB₁ = {Bird(tweety)} | Can conclude: has_feathers(tweety) |
| KB₂ = KB₁ + {Yellow(tweety)} | Still can conclude: has_feathers(tweety) |
| Classical logic is monotonic: more knowledge | more conclusions (never fewer) |
Non-Monotonic Reasoning
New information CAN retract previous conclusions:
Implementing Non-Monotonic Reasoning
Default Logic (Reiter)
"If Bird(x) and it's consistent to assume Flies(x), then Flies(x)"
Written: Bird(x) : Flies(x) / Flies(x)
The middle part is the "justification" — retractable assumption
Circumscription (McCarthy)
Minimize abnormality: assume things are normal unless stated otherwise
"Abnormal birds don't fly. Penguins are abnormal. Others are not."
Truth Maintenance Systems (TMS)
Track dependencies between beliefs
When a belief is retracted, all beliefs derived from it are retracted
Reasoning Under Uncertainty
Bayesian Reasoning
| Prior | P(Disease) = 0.01 (1% base rate) |
| Likelihood | P(Positive_Test | Disease) = 0.95 |
| False positive | P(Positive_Test | No_Disease) = 0.05 |
| Counterintuitive | Even with 95% accurate test, |
Certainty Factors
MYCIN-style reasoning
Rule: IF fever AND cough THEN flu (CF=0.8)
Combining evidence
CF_combine(x, y) = x + y(1-x) when both positive
CF_combine(0.8, 0.6) = 0.8 + 0.6×0.2 = 0.92
Dempster-Shafer Theory
Reasoning System Architectures
Rule-Based Reasoning
| Knowledge | IF-THEN rules |
| Engine | Forward/backward chaining |
| Strength | Explainable, modular |
| Weakness | Brittle, no learning |
Case-Based Reasoning (CBR)
Model-Based Reasoning
| Knowledge | Causal models of how systems work |
| Process | Compare observed behavior with predicted behavior |
| Discrepancy | fault in component → diagnosis |
| Example | Diagnosing car engine from causal model |
| Model predicts: spark plug fires | fuel ignites → piston moves |
| Observation | piston not moving |
| Reasoning backward | check fuel ignition, check spark plug |
Automated Theorem Proving
Resolution-Based Reasoning
| 1. Negate the query | add ¬Query to KB |
| 4. If empty clause derived | contradiction → Query is proved |
| Example | Prove Mortal(socrates) |
| KB: ∀x(Human(x) | Mortal(x)), Human(socrates) |
| CNF | {¬Human(x) ∨ Mortal(x)}, {Human(socrates)} |
| Add negation | {¬Mortal(socrates)} |
| Resolve {¬Human(x)∨Mortal(x)} with {¬Mortal(socrates)} | x=socrates |
Reasoning in Modern AI
| System | Reasoning Type | Method |
|---|---|---|
| ChatGPT | Implicit deductive | Learned patterns |
| Expert Systems | Explicit rule-based | Forward/backward chaining |
| Bayesian Networks | Probabilistic | Belief propagation |
| Knowledge Graphs | Relational | Path traversal + embeddings |
| Planning Systems | Temporal | State-space search |
Interview Questions
Q: What is the difference between sound and complete reasoning? A: Sound: every derived conclusion is true (no false positives). Complete: every true statement can be derived (no false negatives). Resolution is both sound and complete for propositional logic. Ideal systems are both, but often we trade completeness for efficiency.
Q: Why is non-monotonic reasoning important for AI? A: Real-world knowledge is incomplete and defaults are common. We assume cars have four wheels, birds can fly, and people are rational—until evidence says otherwise. Monotonic logic cannot retract conclusions, making it unable to model commonsense reasoning with defaults and exceptions.
Q: How does case-based reasoning differ from rule-based reasoning? A: Rule-based systems apply general rules to specific situations (top-down). Case-based systems find similar past situations and adapt their solutions (bottom-up). CBR is better when rules are hard to articulate but examples abound—like legal reasoning, cooking, or creative design.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Reasoning Systems - Inference Engines.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Artificial Intelligence topic.
Search Terms
artificial-intelligence, artificial intelligence, artificial, intelligence, knowledge, representation, reasoning, systems
Related Artificial Intelligence Topics