Many practical systems keep their knowledge as rules that experts can read and change. Real reasoning must also cope with conclusions that new facts may overturn.

Rule-Based Representation

A rule has the form IF conditions THEN conclusion, or IF conditions THEN action. A set of rules forms the knowledge base, the facts are kept in the working memory, and an inference engine applies the rules. Rules are easy to understand, easy to add to, and close to how experts speak. For example, IF the temperature is above 38 AND the patient has a cough THEN suspect an infection. Their weakness is that a large rule base becomes hard to manage, since rules may conflict, and the order of rules may matter. The conflict resolution strategy chooses one rule when several apply, using priority, the most specific rule, or the most recent data.

Definition: Rule-based system. A system that stores knowledge as IF-THEN rules in a knowledge base and uses an inference engine to apply them to facts in working memory.

Monotonic Reasoning

In monotonic reasoning, adding new facts never removes a conclusion that was reached earlier. The set of known truths only grows. Classical logic is monotonic. This is fine for mathematics but not for everyday life, where we reason with incomplete information.

Non-Monotonic Reasoning

In non-monotonic reasoning, a conclusion may be withdrawn when new information arrives. Suppose we know that Tweety is a bird, and that birds normally fly. We conclude that Tweety flies. If we then learn that Tweety is a penguin, we must withdraw the conclusion. People reason this way all the time, by default assumptions that hold unless there is evidence against them. Methods include default logic, circumscription, which assumes that only what is known to be true is true, and the closed-world assumption, in which anything not stated or provable is false, as in a database. Truth maintenance systems (TMS) record the reasons for each belief, so that when a belief is withdrawn, the beliefs that depended on it are also reconsidered.

Table 2.3: Monotonic and non-monotonic reasoning

Feature Monotonic Non-monotonic
New facts Never remove conclusions May remove conclusions
Information Complete Incomplete
Example Mathematics Default rules
Method Classical logic Default logic, TMS

Example 2.3: Withdrawing a default conclusion

Problem: Rules: birds fly by default; a penguin is a bird; penguins do not fly. Given a bird Tweety, decide whether Tweety flies. Then add that Tweety is a penguin.

Solution:

  1. With only bird(Tweety), the default rule gives flies(Tweety).
  2. When penguin(Tweety) is added, the more specific rule says that Tweety does not fly.
  3. The earlier conclusion is withdrawn.

Result: First, Tweety flies. After the new fact, Tweety does not fly. This is non-monotonic.

def flies(facts):
    if "penguin" in facts:
        return False
    return "bird" in facts
print(flies({"bird"}))
print(flies({"bird", "penguin"}))

Output

True
False

Common mistakes

  • Treating a default conclusion as certain.
  • Using classical (monotonic) logic for a problem with incomplete information.
  • Writing conflicting rules and not giving a conflict resolution strategy.

Key takeaways

  • A rule is IF conditions THEN conclusion.
  • Monotonic reasoning never withdraws a conclusion.
  • Non-monotonic reasoning may withdraw conclusions when new facts arrive.
  • Truth maintenance systems track the reasons for beliefs.

Practice questions

  1. What is non-monotonic reasoning?
  2. What is conflict resolution?
  3. What does a truth maintenance system do?

Answers to the practice questions

  1. Reasoning in which a conclusion may be withdrawn when new information is added.
  2. Choosing which rule to fire when several rules apply.
  3. It records the reasons for beliefs so that dependent beliefs are revised when one is withdrawn.

Sources

  • Official BCA syllabus Artificial Intelligence and Expert Systems, course code 25BCA405DS02, Unit II