Non-monotonic logic allows AGISystem2 to revise conclusions when new information arrives. Unlike classical logic where adding facts never invalidates previous conclusions, non-monotonic reasoning supports defaults, exceptions, and belief revision through theory layers.
Non-monotonic reasoning allows conclusions to be retracted when exceptions are discovered. AGISystem2 implements this through theory layers: defaults live in the base layer, and exceptions in higher layers override them. The "birds fly" default is retracted for Tweety when we learn Tweety is a penguin.
| Concept | Definition | Example |
|---|---|---|
| Default | Rule that applies unless overridden | "Birds typically fly" |
| Exception | Specific case that overrides default | "Penguins don't fly" |
| Specificity | More specific rules override general | Penguin > Bird |
| Retraction | Withdrawing a previous conclusion | "Tweety flies" → retracted |
AGISystem2 implements non-monotonic logic through the TheoryStack:
# Define default rule DEFAULT Bird CAN Fly # Define exception EXCEPTION Penguin CANNOT Fly # Assertions ASSERT Tweety IS_A Penguin ASSERT Penguin IS_A Bird # Query (non-monotonic resolution) ASK "Tweety CAN Fly?" # → FALSE (Penguin exception overrides Bird default)
When multiple rules apply, priority determines the winner:
# Explicit priority DEFAULT PRIORITY=10 Employee gets=StandardBenefits DEFAULT PRIORITY=20 Executive gets=ExecutiveBenefits # Higher priority wins # Specificity-based (automatic) DEFAULT Mammal IS warm_blooded # General EXCEPTION Platypus IS cold_blooded # Specific override
The ValidationEngine checks consistency during belief revision:
// Add new fact that may trigger retractions
const result = knowledge.assertWithRevision("Tweety IS_A Penguin");
// Result includes what was retracted
{
added: ["Tweety IS_A Penguin"],
retracted: ["Tweety flies"],
reason: "Exception Penguin overrides default Bird"
}
All retractions are logged for auditability:
{
event: "BELIEF_RETRACTED",
belief: "Tweety flies",
reason: "Exception triggered by: Tweety IS_A Penguin",
timestamp: "2024-01-15T10:30:00Z"
}