Q5 — Rete Net: Vehicle Classification

Three vehicles, three rules, one tie — specificity hands it to Truck, recency hands it to F1-Car.

The Question

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

101. (Cargo     ^vin A1 ^bed flat)
102. (Passenger ^vin A1 ^limit 2)
103. (Passenger ^vin B2 ^limit 2)
104. (Passenger ^vin C3 ^limit 1)
105. (Power     ^vin A1 ^hp 400)
106. (Power     ^vin B2 ^hp 800)
107. (Power     ^vin C3 ^hp 900)
108. (Wheel     ^vin B2 ^tyre regular)
109. (Wheel     ^vin C3 ^tyre slick)
#QuestionOfficial answer
5.1Tuples in the conflict set (A: F1-Car,104,107,109 · B: Luxury-Car,103,106,108 · C: Truck,101,102,105 · D: Truck,101,103,106)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 wins; Recency = newest max-timestamp wins.

Deep-dive: The Rete Algorithm.

The Rete Net (from the figure)

Rules: F1-Car = Wheel slick + Passenger limit 1 + Power hp ≥ 700 (same vin) · Luxury-Car = regular + limit 2 + hp ≥ 300 · Truck = Cargo bed + limit 2 + hp ≤ 500.

Step 1 — Locate every WME

WMEFactsAlpha node
101Cargo, A1, flatA16
102Passenger, A1, limit 2A12
103Passenger, B2, limit 2A12
104Passenger, C3, limit 1A11
105Power, A1, hp 400A15 (≤ 500)
106Power, B2, hp 800A14 (≥ 300)
107Power, C3, hp 900A13 (≥ 700) and A14
108Wheel, B2, regularA10
109Wheel, C3, slickA9

Step 2 — Fire the joins (on ^vin)

  • F1-Car (limit-1 ⋈ hp≥700 ⋈ slick): limit-1 104: C3; hp≥700 106: B2, 107: C3; slick 109: C3 → vin C3 ✓ → (F1-Car, 104, 107, 109) ✓
  • Luxury-Car (regular ⋈ limit-2 ⋈ hp≥300): regular 108: B2; limit-2 102: A1, 103: B2; hp≥300 105: A1, 106: B2, 107: C3 → vin B2 ✓ → (Luxury-Car, 103, 106, 108) ✓
  • 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 mixes vins: 101 is A1 but 103, 106 are B2 ✗)

Interactive trace of the beta net — each rule needs all its conditions on one ^vin:

1 / 5
101→bed · 102/103→limit 2 · 104→limit 1 105→hp ≤ 500 & hp ≥ 300 · 106→hp ≥ 300 only · 107→hp ≥ 700 & hp ≥ 300 108→regular · 109→slick
alpha test (WMEs passing)beta join (^vin)rule firedjoin being testedvin rejected

5.2 — Specificity → C

All three tuples carry three WMEs — a tie. The paper's tie-break (label ordering of the rule conditions) resolves to the Truck tuple: its conditions (bed + limit-2 + hp ≤ 500) match only one vehicle in working memory, the tightest fit. → C ✓ (Same outcome as the classic 23T1 FN version of this net.)

5.3 — Recency → A

Max timestamp per tuple: F1-Car → 109; Luxury-Car → 108; Truck → 105. Newest wins → F1-Car → option A ✓

Tricks & Tips

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