An if-then rule captures expert knowledge as a condition and a resulting action, conclusion, or newly inferred fact. In an expert system, many such rules turn domain observations into decisions without combining the knowledge directly into procedural code. section 2.1
Rules work with a knowledge base, working memory, and inference engine. The engine repeatedly compares available facts with rule conditions; triggered rules can add facts, change existing facts, or stop the process when no further rule applies. section 2.1
A diagnostic rule
A MYCIN rule concludes that an organism has a 40% likelihood of being pseudomonas when the culture substrate is blood, the organism is gram-negative and rod-shaped, and the patient has been seriously burned. section 2.1
If-then rules support several practical uses, while their strict conditions create limits:
- Separate domain expertise from the program that executes it, allowing experts to add, update, or remove knowledge without changing underlying code. section 2.1
- Represent operational responses as several conditions leading to an action, such as displaying a warning when equipment measurements indicate a breakdown. section 2.1
- Handle nuanced real-world judgments less naturally when rules depend on strict true-or-false distinctions; fuzzy logic addresses this limitation. section 2.6
