Loading…
Glossary term
An early type of AI that encodes human expert knowledge as rules.
An expert system encodes the knowledge of human specialists as 'if-then' rules and applies them to reach conclusions, often explaining its reasoning. They were the main commercial AI of the 1980s.
They are transparent but brittle and hard to maintain as rules multiply.
Simple if-then rules
facts = {"fever": True, "cough": True}
rules = [
(lambda f: f["fever"] and f["cough"], "possible flu"),
(lambda f: not f["fever"], "unlikely flu"),
]
print([out for cond, out in rules if cond(facts)]) # ['possible flu']They show an older, rule-based approach to AI that still appears in business-rule engines.