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)
#QuestionOfficial answer
10.1Which of the following rule-data tuples are in the conflict-set?A, B, C, D
10.2If 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.3If 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:

HalfNodesWhat they store
Alpha netA1…A13Single-WME constant tests. Each node holds every WME that passed its filter
Beta netB1…B5Joins between two token streams, matching on shared variables (item=⟨x⟩\text{item} = \langle x\rangle)

A production RR fires a rule-data tuple (R,w1,w2,… )(R, w_1, w_2, \dots) 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 nodeTestTokens held (WME : binding)
A1CLASS = Energy105 : xx = machine4
A2CLASS = BoM104, 106, 107
A3CLASS = Fuel101, 102, 103
A4item = ⟨x⟩\langle x\rangle (under A1)105 : xx = machine4
A5item = ⟨x⟩\langle x\rangle (under A2)104 : xx = m4 · 106 : xx = m3 · 107 : xx = m1
A6item = ⟨x⟩\langle x\rangle (under A3)101 : xx = m5 · 102 : xx = m2 · 103 (no ^type)
A7source = wind105 : xx = machine4
A8part = alternator104 : xx = machine4 · 106 : xx = machine3
A11type = liquid102 : xx = machine2
A12part = CD-nozzle107 : xx = machine1
A13type = solid101 : xx = 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 / RuleJoin testedResult
B1 (A7 ⋈ A8 on xx)A7 has xx = m4; A8 has {m4,m3}\{m4, m3\}match at xx = m4 → tuple (R1, 104, 105)
R2 (A8 alone)single-condition ruleevery A8 token activates it → (R2, 104) and (R2, 106)
B2 (A9 ⋈ A8)A9 emptynothing
B3 (A11 ⋈ A10 on xx)A10 emptynothing
B4 (A11 ⋈ A12 on xx)A11: xx = m2; A12: xx = m1no overlap → nothing
B5 (A13 ⋈ A12 on xx)A13: xx = m5; A12: xx = m1no overlap → nothing
R7 (A12 alone)single-condition rule(R7, 107)

10.1 — Conflict set → A, B, C, D

Conflict set={(R1,104,105), (R2,104), (R2,106), (R7,107)}\text{Conflict set} = \{(R1,104,105),\ (R2,104),\ (R2,106),\ (R7,107)\}

OptionTupleIn conflict set?
AR1,104,105Yes — B1 join succeeds at xx = machine4
BR2,104Yes — 104 is an alternator BoM
CR2,106Yes — 106 also passes A8
DR7,107Yes — 107 is the only CD-nozzle BoM
ER1,104,106No — B1 needs Energy+wind for the SAME xx: machine3 has no Energy WME
FR3,104,106No — R3 hangs off A9 (stream), which never fired
GR6,102,107No — 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.

TupleRule's conditionsCount
R1,104,105Energy + source=wind + BoM + part=alternator (+ join)4 ← wins
R2,104BoM + part=alternator2
R2,106BoM + part=alternator2
R7,107BoM + part=CD-nozzle2

10.3 — Recency → R7,107

Recency compares the sorted timestamp lists of the tuples' WMEs (lexicographic, newest element dominates):

TupleTimestampsMost recent
R1,104,105104, 105105
R2,104104104
R2,106106106
R7,107107107 ← newest overall

Interactive trace — WMEs flowing through the net

1 / 9
Working memory starts empty. All alpha nodes and betas hold nothing.
alpha node (constant test)just activatedholding tokensrule in conflict setempty

Tricks & Tips

Answers: 10.1 A, B, C, D · 10.2 R1,104,105 / R1,105,104 · 10.3 R7,107