A production system is the simplest serious model of a thinking process, and the direct ancestor of ACT-R, SOAR, expert systems, and (squint) your agent harness’s dispatch loop. It has three parts:
- Working memory (WM): a set of facts — the system’s current situation. (Deliberately named after last lesson’s human buffer; Newell & Simon meant the correspondence.)
- Productions: IF–THEN rules. The IF side is a pattern over WM; the THEN side adds or removes facts (or acts on the world).
- The recognize–act cycle: (1) match — find all rules whose conditions hold; (2) conflict resolution — the matched set usually has more than one rule, and some policy must pick one; (3) act — fire it, changing WM. Repeat.
Note what’s not here: no program counter, no call stack. Control flow is reborn every cycle from whatever WM now contains — which is what lets these systems react opportunistically instead of marching through a script. The price: when several rules match at once, the conflict-resolution policy quietly becomes the system’s personality.
Trace this one. WM starts as: {goal: tea, kettle: empty}
P1: IF goal=tea AND kettle=empty THEN set kettle=full
P2: IF goal=tea AND kettle=full AND NOT water=hot THEN set water=hot
P3: IF goal=tea AND water=hot THEN add tea=made, remove goal
P4: IF goal=tea THEN check-phone (adds nothing to WM)
Conflict resolution: the rule with the most conditions (most specific match) wins; the cycle halts when no rule matches. Which rules fire, in what order?