Q10 — RULE BASED EXPERT SYSTEMS
Seven WMEs trickle through the Rete net; four rule-data tuples survive the joins, and specificity vs recency pick different winners.
The Question
A Rete Net for classification of machines is given. The labels A1, A2, A3, ..., A13, B1, ..., B5, R1, ..., R8 uniquely identify the nodes in the network. When required, use label ordering to break ties.
Run the Rete algorithm for the Working Memory shown below, where the WMEs are in timestamp order:
101.(Fuel ^item machine5 ^type solid)102.(Fuel ^item machine2 ^type liquid)103.(Fuel ^item machine3)104.(BoM ^item machine4 ^part alternator)105.(Energy ^item machine4 ^source wind)106.(BoM ^item machine3 ^part alternator)107.(BoM ^item machine1 ^part CD-nozzle)
| # | Question | Official answer |
|---|---|---|
| 10.1 | Which of the following rule-data tuples are in the conflict-set? | A, B, C, D |
| 10.2 | If the Inference Engine uses Specificity as the conflict resolution strategy then identify the rule-data tuples that will be ready to fire. If multiple rule-... | R1,104,105 / R1,105,104 |
| 10.3 | If the Inference Engine uses Recency as the conflict resolution strategy then identify the rule-data tuples that will be ready to fire. If multiple rule-data... | R7,107 |
The Topic in 60 Seconds
Rete pushes every WME through two halves of the network:
| Half | Nodes | What they store |
|---|---|---|
| Alpha net | A1…A13 | Single-WME constant tests. Each node holds every WME that passed its filter |
| Beta net | B1…B5 | Joins between two token streams, matching on shared variables () |
A production fires a rule-data tuple when a token reaches it through every one of its conditions. The set of all live tuples = the conflict set.
Deep-dive: browse the Concepts section for Rule-Based Expert Systems / Rete.
Step 0 — Alpha net contents after all 7 WMEs
| Alpha node | Test | Tokens held (WME : binding) |
|---|---|---|
| A1 | CLASS = Energy | 105 : = machine4 |
| A2 | CLASS = BoM | 104, 106, 107 |
| A3 | CLASS = Fuel | 101, 102, 103 |
| A4 | item = (under A1) | 105 : = machine4 |
| A5 | item = (under A2) | 104 : = m4 · 106 : = m3 · 107 : = m1 |
| A6 | item = (under A3) | 101 : = m5 · 102 : = m2 · 103 (no ^type) |
| A7 | source = wind | 105 : = machine4 |
| A8 | part = alternator | 104 : = machine4 · 106 : = machine3 |
| A11 | type = liquid | 102 : = machine2 |
| A12 | part = CD-nozzle | 107 : = machine1 |
| A13 | type = solid | 101 : = machine5 |
Dead branches: A9 (source = stream) and A10 (part = turbine-blades) hold nothing — so everything downstream of them (B2/B3, R3/R4/R5) can never activate this run.
Step 1 — Beta joins and rule activations
| Beta / Rule | Join tested | Result |
|---|---|---|
| B1 (A7 ⋈ A8 on ) | A7 has = m4; A8 has | match at = m4 → tuple (R1, 104, 105) |
| R2 (A8 alone) | single-condition rule | every A8 token activates it → (R2, 104) and (R2, 106) |
| B2 (A9 ⋈ A8) | A9 empty | nothing |
| B3 (A11 ⋈ A10 on ) | A10 empty | nothing |
| B4 (A11 ⋈ A12 on ) | A11: = m2; A12: = m1 | no overlap → nothing |
| B5 (A13 ⋈ A12 on ) | A13: = m5; A12: = m1 | no overlap → nothing |
| R7 (A12 alone) | single-condition rule | (R7, 107) |
10.1 — Conflict set → A, B, C, D
| Option | Tuple | In conflict set? |
|---|---|---|
| A | R1,104,105 | Yes — B1 join succeeds at = machine4 |
| B | R2,104 | Yes — 104 is an alternator BoM |
| C | R2,106 | Yes — 106 also passes A8 |
| D | R7,107 | Yes — 107 is the only CD-nozzle BoM |
| E | R1,104,106 | No — B1 needs Energy+wind for the SAME : machine3 has no Energy WME |
| F | R3,104,106 | No — R3 hangs off A9 (stream), which never fired |
| G | R6,102,107 | No — B4 fails: liquid is machine2, CD-nozzle is machine1 |
10.2 — Specificity → R1,104,105
Specificity = number of WME patterns (conditions) in the rule; most specific wins.
| Tuple | Rule's conditions | Count |
|---|---|---|
| R1,104,105 | Energy + source=wind + BoM + part=alternator (+ join) | 4 ← wins |
| R2,104 | BoM + part=alternator | 2 |
| R2,106 | BoM + part=alternator | 2 |
| R7,107 | BoM + part=CD-nozzle | 2 |
10.3 — Recency → R7,107
Recency compares the sorted timestamp lists of the tuples' WMEs (lexicographic, newest element dominates):
| Tuple | Timestamps | Most recent |
|---|---|---|
| R1,104,105 | 104, 105 | 105 |
| R2,104 | 104 | 104 |
| R2,106 | 106 | 106 |
| R7,107 | 107 | 107 ← newest overall |
Interactive trace — WMEs flowing through the net
Tricks & Tips
Answers: 10.1 A, B, C, D · 10.2 R1,104,105 / R1,105,104 · 10.3 R7,107