Q5 — Rete Net: Engines, Turbines and Motors

Match WMEs through alpha/beta nodes, build the conflict set, then let specificity and recency disagree — on purpose.

The Question

A Rete net classifying machines (Windmill, Generator, Watermill, Turbine, Gas Turbine, Liquid Fuel Rocket, Rocket, Solid Fuel Rocket). Working memory:

101. (Fuel  ^item N59 ^type solid)
102. (Fuel  ^item N26 ^type liquid)
103. (Fuel  ^item N37)
104. (BoM   ^item N48 ^part alternator)
105. (Energy ^item N48 ^source wind)
106. (BoM   ^item N37 ^part alternator)
107. (BoM   ^item N15 ^part CD-nozzle)
#QuestionOfficial answer
5.1Tuples in the conflict set (A: (LFR,102,107) · B: (SFR,107,101) · C: (Windmill,105,104) · D: (Generator,104) · E: (Generator,106) · F: (Rocket,107))C, D, E, F
5.2Specificity firesC
5.3Recency firesF

The Topic in 60 Seconds

  • Alpha nodes filter single WMEs; beta nodes join two streams on a shared variable (= <x> joins on ^item).
  • Conflict set = all fully matched (rule, data…) tuples.
  • Specificity = rule with the most conditions (most WMEs) fires.
  • Recency = tuple containing the newest (highest-timestamp) WME fires.

Deep-dive: The Rete Algorithm.

The Rete Net (from the figure)

Step 1 — Locate every WME

WMEFactsAlpha node
101Fuel, N59, solidA13
102Fuel, N26, liquidA11
103Fuel, N37 (no type)A6 (fails A11/A13)
104BoM, N48, alternatorA8
105Energy, N48, windA7
106BoM, N37, alternatorA8
107BoM, N15, CD-nozzleA12

Step 2 — Fire the joins (on ^item)

  • R1 Windmill (B1 = wind ⋈ alternator): wind 105: N48 × alternators 104: N48, 106: N37 → (R1, 105, 104) ✓ on N48
  • R2 Generator (A8 alone): 104, 106 → (R2, 104) ✓, (R2, 106) ✓
  • R3 Watermill (stream ⋈ alternator): no stream WMEs → empty
  • R4 Turbine (blades): none → empty
  • R5 Gas Turbine (blades ⋈ liquid): blades empty → empty
  • R6 Liquid Fuel Rocket (liquid ⋈ nozzle): 102 (N26) vs 107 (N15) → no match → empty
  • R7 Rocket (A12 alone): 107 → (R7, 107) ✓
  • R8 Solid Fuel Rocket (nozzle ⋈ solid): 101 (N59) vs 107 (N15) → no match → empty

Conflict set = (R1, 105, 104), (R2, 104), (R2, 106), (R7, 107) → options C, D, E, F ✓

Interactive trace of the beta net — every join tested on a shared ^item:

1 / 7
101→solid · 102→liquid · 104/106→alternator 105→wind · 107→nozzle (103 Fuel N37 fails every type/part test) No stream or blades WMEs exist → Watermill, Turbine, Gas Turbine die here.
alpha test (WMEs passing)beta joinrule firedjoin being testedempty / dead branch

5.2 — Specificity → C

Count WMEs per tuple: R1's has 2; each R2 tuple has 1; R7's has 1. Most specific = (R1, 105, 104) → option C.

5.3 — Recency → F

Newest WME in each tuple: R1 → max(105,104) = 105; R2 → 106; R7 → 107. Highest wins → (R7, 107) → option F.

Notice the flip

Specificity picks the two-WME Windmill tuple; recency picks the one-WME Rocket tuple (timestamp 107 is the newest fact). The strategies disagree whenever a recent fact feeds a general rule — exactly what this question tests.

Tricks & Tips

Answers: 5.1 C, D, E, F · 5.2 C · 5.3 F