Back to list

Tech Blog · Algorithms Explained

[Prescription Methods 1] Turning experienced operators' rules into code — rule-based operation

"If the reactor temperature nears its upper limit, open the cooling water valve further." We look at how rule-based operation, the oldest prescription method and still the most widely used, is structured, the conflicts and gaps that appear as rules multiply, and how to use it together with other methods.

Jun 18, 2026 · OPTI-X

Series “Prescription Methods” · Part 1

The most widely used prescription method in factories is not AI. It is operating standards and the rules of experienced operators. "If the temperature goes above this value, open the cooling water; if it falls below that value, close it." Rules like these distill long experience, and they still run most processes today.

Rule-based operation is also the starting point for the other methods covered in this series. Even when a new method comes in, rules remain as the baseline for comparison and as safety limits. So we first look at how rules work and where they get stuck.

How it works: rules, current state, interpreter

Davis and King (1984) describe a rule-based system as three components: a set of rules, a database that holds the current state, and an interpreter that selects and executes rules. Each rule is a pair: "if ... (condition), then ... (action)."

The interpreter picks one rule that matches the current state and executes it, and when the state changes as a result, it picks again. This loop is called the recognize-act cycle. When several rules match, the process of choosing one is called conflict resolution. Because the full state is re-examined at every cycle to choose a rule, the system responds immediately to changes, but that re-evaluation costs computation.

The flow of rule-based prescription

Check the conditions, then pick the predefined action

  1. 1
    Check the current stateRead sensor values and operating status
    Next
  2. 2
    Match rule conditionsCheck conditions such as 'if the temperature nears its upper limit and feed is on' one by one; if several rules match, pick one by priority
    Condition matched → that ruleNo rule matches → human judgment
  3. 3
    Execute the predefined actionA predetermined action such as 'increase dosing by 10%'; check again when the state changes
    Execute

Rules can be used in two directions. In the data-driven approach, you start from measurements and find matching rules; in the goal-directed approach, you start from a conclusion you want to confirm and work backward to the conditions it needs. Operating rules that decide actions from sensor values are closer to the former.

The expert systems popular in the 1980s worked on the same principle. Hayes-Roth (1985) described rule-based systems as a way to automate problem-solving know-how and to capture and refine human expertise. The knowledge base of MYCIN, a well-known medical consultation system, held 450 rules and about 1,000 additional facts organized in tables (Buchanan and Shortliffe 1984).

In control, a branch emerged that carries rules over as they are spoken. Mamdani and Assilian (1975) reported an experiment that built a controller by computing control rules expressed in words with fuzzy logic, and King and Mamdani (1977) addressed applying this fuzzy control to industrial processes.

Worked example: three reactor cooling rules

Suppose there are three rules for managing reactor temperature (hypothetical).

  • Rule A: If the temperature is near the upper limit, open the cooling water valve.
  • Rule B: If raw material is being fed, leave the cooling water valve as it is.
  • Rule C: If the temperature is near the upper limit and the pressure is also high, open the cooling water valve.

If the temperature approaches the upper limit while raw material is being fed, A and B match at the same time, and their actions are opposite. C has just one more condition than A with the same action, so whenever C matches, A always matches too. And there is no rule for "low temperature but high pressure."

Suwa et al. (1984) divided the problems that arise in a rule set into four types: conflict, redundancy, subsumption, and missing rules. In the example above, A and B are a conflict, A and C a subsumption, and the high-pressure-only case a missing rule.

Four checks for a rule set

The more rules there are, the harder they are to spot by eye

CheckMeaningIn the example
ConflictTwo rules give different actions in the same situationA and B: high temperature during feeding
RedundancyTwo rules give the same action in the same situationThe same rule registered twice
SubsumptionSame action, but one rule's conditions are narrowerIf C matches, A matches
Missing ruleNo rule fits a situation that needs a decisionOnly the pressure is high
Source: Suwa et al. (1984), Chapter 8 of Rule-Based Expert Systems (Buchanan and Shortliffe, eds.)

According to Suwa et al., only conflict is guaranteed to be a true error. Redundancy causes problems when one of the two rules is revised and the other left unchanged, and in systems that add up scores for each piece of evidence, it counts the same evidence twice. Finding missing rules requires listing every combination of conditions, but some combinations can never occur in practice, so process knowledge is needed in the end. The authors wrote that even after hundreds of test runs, it is rarely possible to guarantee that a rule set has been completely checked.

They therefore proposed checking the rule set itself systematically, separately from test runs. A checking tool shows potential problems, and an expert judges whether each is a real error. The reasons for judging something not to be an error are recorded too, making the next check more accurate. The same sequence can be used when revising operating standards.

Strength: explainable and predictable

Strengths and limits of rule-based operation

The strengths and the limits come from the same root

Strengths
Limits
Explanation
The rule immediately explains why that action
Cannot explain reasons not in the rules
Predictability
Always the same action in the same situation
Cannot respond when the situation differs even slightly
Data
Can be built without data
Does not improve on its own as data accumulates
Maintenance
Easy with only a few rules
Rules conflict as they multiply

A rule is its own explanation. When an action comes out, the reason can be given at once as "this rule's conditions matched." Because the same situation always produces the same action, operators can anticipate the result.

Davis and King point to modularity as another strength. Rules never call other rules directly and connect only through the current state, so adding or removing one rule does not require changing any other. But they also note that, for the same reason, even for simple tasks the overall behavior is often not evident from simply reading the list of rules.

Limit: the combinations explode

With two or three variables, rules are enough. But in a process where raw material composition, inflow rate, temperature and equipment condition all change together, the number of combinations grows rapidly. Dividing four variables into just three bands each (low, normal, high) already gives 81 combinations. Rules are tuned to the "average situation," so when several conditions change at once, operation easily drifts away from the optimum.

Building the rules is itself a bottleneck. The MYCIN researchers named knowledge acquisition as the critical bottleneck in building expert systems. As problems suited to this approach, they listed those narrow enough in scope that a knowledge base can be built and refined in a reasonable time, and defined in a "closed world" with a bounded vocabulary (Buchanan and Shortliffe 1984). Another lesson they left is that the first knowledge base will inevitably be an approximation, so it must be possible to refine it step by step while quickly seeing the results of each change.

Rules do not improve on their own as data accumulates. Revising rules, and checking that revised rules do not clash with others, are both left to people. And when experienced operators retire, the know-how that never made it into the rules disappears with them.

How it relates to other methods

Rules are used alongside the methods in later parts rather than competing with them. When evaluating data-driven prescription, the baseline for comparison is the existing rules, and rules such as upper/lower limits and interlocks remain as constraints that come before any prescription.

The methods in later parts pick up where rules get stuck. When there are too many combinations to set the optimum by rules, it is found through planned experiments (Part 2); when raw materials and load keep changing, a process model is used to predict ahead and adjust (Part 3). When neither experiments nor a model are feasible, the starting point is accumulated operating data (Parts 5 and 7).

How to make use of rule-based operation

Not something to throw away, but a starting point

Starting pointThe baseline for data-driven prescription
Judge a new method by whether it beats the existing rules
SafeguardLines that must never be crossed
Upper/lower limit and interlock rules take priority over any AI
KnowledgeExperienced operators' rules are valuable data
Written-down rules become constraints for AI training

Writing down experienced operators' rules has one more use. If it is recorded what operators look at when they change an action, that record becomes a basis for interpreting which judgment produced the actions left in operating data.

Rule-based operation is strong in explainability and predictability, and in processes where combinations of conditions multiply, other methods are needed to check and complement the rules. In the next part, we look at design of experiments, which finds the optimum through experiments instead of rules.

References

Could this work for your process?

Talk to us