Rules & Logic: Expert Systems
AI before it learned from data: asked experts, wrote down rules, hoped.
In the 1980s, companies spent millions trying to bottle human expertise into computer programs. These "expert systems" diagnosed diseases, configured computers, and analyzed chemical compounds — all by following thousands of hand-coded if-then rules.
Some saved Fortune 500 companies tens of millions of dollars per year. Then they collapsed under the weight of their own rules. Their rise and fall is the cautionary tale that explains why modern AI learns from data instead of following instructions.
Core Thesis
Expert systems represent the pinnacle and the breaking point of symbolic AI: the idea that human expertise can be captured as explicit rules worked impressively in constrained domains, but the combinatorial explosion of real-world complexity proved that encoding knowledge by hand cannot scale. This failure forced the paradigm shift toward machine learning.
The Architecture of an Expert System
Definition
Expert System
Analogy
Definition
Limitation: A decision tree is static and linear. Real inference engines can chain rules dynamically and combine multiple rules.
How the Inference Engine Works
- 1. Input symptoms: The user enters known factse.g., "Patient has a fever of 39 degrees Celsius"
- 2. Match rules: The engine searches for all rules whose conditions match the current facts
- 3. Fire rule: The matching rule is executed, producing new facts or conclusions
- 4. Update fact base: New findings are added to the fact base
- 5. Repeat or conclude: The process continues until a diagnosis or recommendation is reached
MYCIN — A Real Expert System
MYCIN was developed at Stanford University from 1972 onward and diagnosed bacterial blood infections using, in the end, about 500 hand-coded rules. Here are two freely modeled MYCIN-style rules as pseudocode:
Note
MYCIN — A Real Expert System
RULE 047 IF: (1) The infection is in the blood, AND (2) The organism grew in a culture, AND (3) The shape of the organism is rod-shaped THEN: Strong evidence (0.8) that the organism is a bacterium. RULE 050 IF: (1) The organism is a bacterium, AND (2) The patient has a compromised immune system THEN: Recommend broad-spectrum antibiotics.
The 0.8 in Rule 047 shows that MYCIN could handle uncertainty — more on this in the Deep Dive at the end. In studies, MYCIN's treatment suggestions for meningitis cases reached an acceptance rate of 65% — as good as or better than Stanford specialists. However, it was never used clinically, mainly for technical reasons (no integration into everyday hospital work), but also due to legal and ethical concerns.
Two Inference Strategies
Data-driven: Start with facts, fire matching rules, reach a conclusion. Example: Patient has fever + cough; system fires all matching rules; diagnosis: flu.
Goal-driven: Start with hypothesis, search for supporting facts. Example: "Does the patient have flu?" System checks: Fever present? Cough present? Hypothesis confirmed or rejected.
Caution
Common Misconception
"Expert systems understand the domain." — Wrong. They match rules mechanically. MYCIN had no concept of what "blood" or "infection" meant. If you fed it car repair symptoms formatted as medical data, it would happily diagnose a carburetor as having a bacterial infection.
Interactive: What Plant Is This?
Experience an expert system in action. Answer questions about an unknown plant — the system applies if-then rules to reach a diagnosis. Real expert systems like MYCIN work in a similar way.
Rise and Fall — The Expert Systems Boom
In the 1980s, expert systems left university laboratories and triggered an unprecedented commercial boom.
R1/XCON Rules
2.500
Hand-coded if-then rules for configuring VAX computer systems (as of the early 1980s; by 1987 there were already 6,200)
Annual Savings
25 -40 M $
Saved by DEC (Digital Equipment Corporation) through fewer misconfigurations
MYCIN Acceptance
65 %
For treatment suggestions in meningitis — on par with Stanford specialists
The Hype Cycle
DENDRAL (1965) analyzed chemical compounds. MYCIN (1976) diagnosed blood infections. R1/XCON (1980) configured DEC computer orders with 95-98% accuracy, saving an estimated $25-40 million per year. Japan launched the roughly $400 million "Fifth Generation Computer Systems" project in 1982. Western governments hastily followed with their own subsidies.
The Maintenance Nightmare
The flagship project R1/XCON revealed the weakness. Every new hard drive and every new cable that DEC released required updating the knowledge base. A large team of expensive knowledge engineers was permanently needed just to keep the system running. Every year, about half of the rules changed.
The expert systems boom resembles the dot-com bubble of the late 1990s: everyone believed every company needed an expert system. Consultants sold million-dollar AI solutions that often delivered disappointing results. The correction was inevitable.
Caution
Common Misconception
"Expert systems failed because the technology was bad." — Wrong. In narrow, stable domains, they worked excellently (and still do today). The failure was trying to apply a narrow-domain solution to the infinite complexity of the real world.
Combinatorial Explosion — Why Rules Don't Scale
If expert systems can reason so precisely, why not simply build one for every problem? The answer is a mathematical phenomenon: combinatorial explosion.
Caution
The Mathematics of Failure
10 binary facts = 2^10 = 1,024 possible states. 100 binary facts = 2^100 = approximately 10^30 possible states. More facts don't make a system better — they make it unpredictable. Rules that work correctly in isolation can contradict each other in combination and deadlock the inference engine.
The Knowledge Bottleneck
Try explaining the concept of "funny" to an alien as if-then rules: "IF someone falls unexpectedly THEN it's funny — BUT NOT if they're hurt — BUT YES if they only stumble slightly — BUT NOT if they're elderly — BUT..." The rules never end. Human judgment relies on implicit knowledge that resists explicit formalization.
Example: Autonomous Driving
"IF traffic light is red THEN stop" is easy. But: "IF a pedestrian is on the road AND a car is approaching fast AND swerving left is physically possible BUT oncoming traffic exists THEN..." Every new context creates countless new branches. A rule-based system would need millions of rules for traffic — and would still fail at the first unexpected puddle.
The Paradigm Shift
This is exactly why machine learning replaced expert systems. Instead of trying to write all the rules, ML systems learn patterns from millions of examples. A self-driving car has "seen" millions of traffic situations and learned to generalize — without anyone having to write down every situation as a rule.
MYCIN did not use simple yes/no rules. It used certainty factors between −1 and +1 (−1 = definitely false, +1 = definitely true). Rule 047 produced evidence of 0.8, not an absolute statement. When multiple rules pointed to the same organism, MYCIN combined the factors using a custom formula — deliberately not Bayesian probability, which would have required experts to estimate countless conditional probabilities. This was an early attempt at handling uncertainty in rule-based systems.
Expert systems are not extinct. In heavily regulated niches, they are still used: in clinical decision support (in the US, such software only falls outside the definition of a medical device if clinicians can review the basis of every recommendation themselves), in tax software, and in aircraft safety checklists. Increasingly, hybrid systems are being built: machine learning evaluates fuzzy data, while a rule base enforces hard safety limits. This combines the strengths of both approaches.
Note
Takeaways
- Expert systems encode human expertise as if-then rules, processed by an inference engine against a fact base — they don't learn from data.
- They worked brilliantly in narrow domains (MYCIN: 65% accepted treatment suggestions, R1/XCON: 95-98% correct configurations), but became unmaintainable as rules grew.
- The combinatorial explosion (100 binary facts = 10^30 states) and the knowledge bottleneck made scaling impossible — this failure drove the paradigm shift to machine learning.
Check
Knowledge Check: Expert Systems
What are the three main components of a classic expert system?
Select one answer
1. What are the three main components of a classic expert system?
2. A doctor wants to confirm whether a patient has condition X by systematically checking which symptoms support that hypothesis. Which inference strategy is this?
3. A company's expert system has 80 binary facts. A new product line requires adding 20 more facts. By roughly what factor does the number of possible system states increase?
4. R1/XCON saved DEC millions by configuring computer orders, yet the system eventually became unsustainable. A modern company faces a similar configuration problem. Which approach would best address R1/XCON's core weakness?
Check
Self-Check
Can you explain this in your own words? Tick what you've got.
0 of 3 done