Q5 — Rete Net: Vehicle Classification

Limit 8 makes a Minivan, hp 900 with limit 2 a Luxury-Car — and Truck's three conditions win specificity.

The Question

A Rete net classifies vehicles (Luxury-Car, Minivan, Truck). Working memory:

101. (Cargo     ^vin A1 ^bed flat)
102. (Passenger ^vin A1 ^limit 2)
103. (Passenger ^vin B2 ^limit 8)
104. (Passenger ^vin C3 ^limit 2)
105. (Power     ^vin A1 ^hp 400)
106. (Power     ^vin B2 ^hp 250)
107. (Power     ^vin C3 ^hp 900)
108. (Wheel     ^vin B2 ^tyre regular)
109. (Wheel     ^vin C3 ^tyre regular)
#QuestionOfficial answer
5.1Tuples in the conflict set (A: Luxury-Car,104,107 · B: Minivan,103,106 · C: Truck,101,102,105 · D: Minivan,103,106,108)A, B, C
5.2Specificity firesC
5.3Recency firesA

The Topic in 60 Seconds

Alpha nodes filter single WMEs; beta nodes join on the shared ^vin. Conflict set = all full tuples. Specificity = most conditions; Recency = newest max-timestamp.

Deep-dive: The Rete Algorithm.

The Rete Net (from the figure)

Rules: Luxury-Car = Passenger limit 2 + Power hp ≥ 700 · Minivan = limit 8 + hp ≤ 300 · Truck = Cargo bed + Passenger limit 2 + Power hp ≤ 500 (same ^vin throughout).

Step 1 — Locate every WME

WMEFactsAlpha node
101Cargo, A1, flatA14
102Passenger, A1, limit 2A7
103Passenger, B2, limit 8A8
104Passenger, C3, limit 2A7
105Power, A1, hp 400A13 (≤ 500)
106Power, B2, hp 250A11 (≤ 300)
107Power, C3, hp 900A9 (≥ 700)

(108, 109 are Wheel WMEs — no CLASS = Wheel node in this net, they stay unused.)

Step 2 — Fire the joins (on ^vin)

  • Luxury-Car (limit-2 ⋈ hp≥700): limit-2 102: A1, 104: C3; hp≥700 107: C3 → vin C3 ✓ → (Luxury-Car, 104, 107) ✓
  • Minivan (limit-8 ⋈ hp≤300): limit-8 103: B2; hp≤300 106: B2 → vin B2 ✓ → (Minivan, 103, 106) ✓
  • Truck (bed ⋈ limit-2 ⋈ hp≤500): bed 101: A1; limit-2 102: A1; hp≤500 105: A1 → vin A1 ✓ → (Truck, 101, 102, 105) ✓

Conflict set = options A, B, C ✓ (D is invalid — Minivan has no Wheel condition, so 108 can't be in its tuple.)

Interactive trace of the beta net — each step fires one join on a shared ^vin:

1 / 5
102→A7 · 104→A7 · 103→A8 (Passenger) 107→A9 · 106→A11 · 105→A13 (Power) 101→A14 (Cargo). Wheels 108/109: no CLASS = Wheel node → dead.
alpha test (WMEs passing)beta join (on ^vin)rule firedjoin being tested

5.2 — Specificity → C

Count conditions: Luxury-Car = 2, Minivan = 2, Truck = 3 (bed + limit-2 + hp ≤ 500). Most conditions → (Truck, 101, 102, 105) → option C ✓

5.3 — Recency → A

Max timestamp per tuple: Luxury-Car → 107; Minivan → 106; Truck → 105. Newest wins → (Luxury-Car, 104, 107) → option A ✓

Watch the thresholds

hp 250 passes hp ≤ 300 (Minivan) but fails hp ≤ 500? No — 250 ≤ 500 too, but B2 has no bed, so only the Minivan join catches it. Always test the JOIN (same vin), not each alpha in isolation.

Tricks & Tips

Answers: 5.1 A, B, C · 5.2 C · 5.3 A