Concept · Chapter 1: What Is Artificial Intelligence?
Logic and Rules
Rule-based AI stores knowledge as if–then rules and derives conclusions by chaining them together, forward from facts or backward from goals.
The problem
How can a machine reach conclusions it wasn't told directly?
The solution
Encode knowledge as logical rules and let an inference engine apply them mechanically to known facts.
The consequence
Conclusions come with a traceable explanation — but only as good as the rules, which must be written and maintained by hand.
You should understand first
- The Turing Test
- Symbolic AI
- Logic and Rules
Tiny example
Facts
Tweety is a bird. Tweety is not a penguin.Rule
IF x is a bird AND x is not a penguin THEN x can fly.Inference
Match the rule to the facts → conclude: Tweety can fly.The catch
Ostriches. Kiwis. Birds with broken wings. Dead birds. Each needs another rule or exception — and so on without end.
How it works
A knowledge base holds facts and rules; an inference engine applies them. Forward chaining starts from known facts and fires every rule it can, adding conclusions until nothing new appears. Backward chaining starts from a goal ("can Tweety fly?") and works back to the facts that would establish it — the strategy MYCIN used when questioning doctors.
Languages like Prolog (1972) made this style of programming direct: you state facts and rules, and the system searches for proofs.
Why it matters today
The strength — every answer has an explanation — is exactly what many learned models lack. The weakness — every exception must be written by hand — is the reason AI moved toward learning. Try writing spam rules yourself in Write the Rules.
What to remember
- Knowledge base (facts + rules) + inference engine = rule-based system.
- Forward chaining: facts → conclusions. Backward chaining: goal → the facts needed.
- Every conclusion can be explained by the rules that produced it.
- Classical logic is all-or-nothing; real knowledge is uncertain and full of exceptions.
Key papers
ELIZA—a computer program for the study of natural language communication between man and machine
Joseph Weizenbaum · 1966 · Communications of the ACM
A pattern-matching chatbot that people readily attributed understanding to — an early lesson in how easily fluent text is mistaken for intelligence.