Back to Learning Area

Rules & Logic: Expert Systems

AI before it learned from data: asked experts, wrote down rules, hoped.

  • History
  • 10 min
  • Intermediate

Plain Language

This preview is in Plain Language. The whole portal is also available in Plain Language. You can change the language at the top. Or use the button below. Our Plain Language texts are AI-assisted and editorially reviewed. They follow the core principles of easy-to-read language, but they are not certified Easy Read: a review panel of people with learning difficulties does not test them.

Preview: AI with if-then rules

What an expert system is

An expert system is a computer program. It has many if-then rules. The rules come from human experts. The system can answer questions with them. It does not learn from data by itself.

Successes and limits

Expert systems worked well in small areas. The system MYCIN recognized diseases better than many doctors. Over time, more and more rules became necessary. Maintaining the system became very complex.

Why machine learning won

The world is too complex for rules alone. There are too many possible situations. Rules cannot cover all of that. Machine learning means: a computer learns from millions of examples. This is how it finds patterns itself.

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

Think of a customer support decision tree: "Is the power LED on? Yes: Check the monitor cable. No: Check the power cable." The tree encodes the experienced technician's knowledge as rigid rules. The customer's specific symptoms are the facts. Walking through the tree is the inference engine.

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. 1. Input symptoms: The user enters known factse.g., "Patient has a fever of 39 degrees Celsius"
  2. 2. Match rules: The engine searches for all rules whose conditions match the current facts
  3. 3. Fire rule: The matching rule is executed, producing new facts or conclusions
  4. 4. Update fact base: New findings are added to the fact base
  5. 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

Forward Chaining

Data-driven: Start with facts, fire matching rules, reach a conclusion. Example: Patient has fever + cough; system fires all matching rules; diagnosis: flu.

Backward Chaining

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

  1. Expert systems encode human expertise as if-then rules, processed by an inference engine against a fact base — they don't learn from data.
  2. They worked brilliantly in narrow domains (MYCIN: 65% accepted treatment suggestions, R1/XCON: 95-98% correct configurations), but became unmaintainable as rules grew.
  3. 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

Not completed

What are the three main components of a classic expert system?

Select one answer

Answer Key: 1) B · 2) B · 3) C · 4) B

Check

Self-Check

Can you explain this in your own words? Tick what you've got.

0 of 3 done