AI Search · Exam notes
One Rete comprehension per paper, three sub-questions on one network: which rule-data tuples match? which fires under specificity? which fires under recency? One chain answers all: locate every WME in the alpha net, keep only the tuples whose shared variables agree, then count tests for specificity and compare timestamps for recency.
| Term | Meaning |
|---|---|
| WME | One fact: (class, attribute values), plus a timestamp (its sequence number, here 101 to 109). Higher number = more recent. |
| Rule | LHS patterns (conditions on WMEs) arrow RHS action (the classification). A rule fires only if every LHS pattern matches. |
| Alpha node | Tests one WME at a time: class name, then one attribute test. A WME sits in every alpha node whose test it passes. |
| Beta node | Join: checks variable consistency. Here each beta demands one shared variable \(\langle v \rangle\) (the vin) be equal across its WMEs. |
| Conflict set | All rule-data tuples with every pattern matched. First-cycle question: build this set, then resolve it. |
| Specificity | Most tests fires first. Count tests from the top of the net down to the rule node. Most alpha tests wins. |
| Recency | Highest timestamp fires first. For each tuple take the max WME timestamp, then take the max over tuples. |
Conventions used on this page: ties break by label order (A1, A2, ..., B1, ...). A negated test is written ¬X (the question text writes it as ~X). This network has no negated tests; drill D2 shows how one works.
3a. The network as tables (solve from this, then check the animation)
| Alpha chain | Tests | WMEs that stop here |
|---|---|---|
| A1, A5, A9 | Wheel; vin = \(\langle v \rangle\); tyre = slick | 109 (C3, slick) |
| A1, A5, A10 | Wheel; vin = \(\langle v \rangle\); tyre = regular | 108 (B2, regular) |
| A2, A6, A11 | Passenger; vin = \(\langle v \rangle\); limit = 1 | 104 (C3) |
| A2, A6, A12 | Passenger; vin = \(\langle v \rangle\); limit = 2 | 102 (A1), 103 (B2) |
| A3, A7, A13 | Power; vin = \(\langle v \rangle\); hp \(\ge\) 700 | 106 (B2, 800), 107 (C3, 900) |
| A3, A7, A14 | Power; vin = \(\langle v \rangle\); hp \(\ge\) 300 | 105 (A1, 400), 106, 107 |
| A3, A7, A15 | Power; vin = \(\langle v \rangle\); hp \(\le\) 500 | 105 (A1, 400) only |
| A4, A8, A16 | Cargo; vin = \(\langle v \rangle\); bed = \(\langle x \rangle\) | 101 (A1, flat) |
| Rule (via beta) | Needs (same vin \(\langle v \rangle\)) | Patterns |
|---|---|---|
| F1-Car via B1 | A9 + A11 + A13 | 3 |
| Luxury-Car via B2 | A10 + A12 + A13 | 3 |
| Truck via B3 | A12 + A14 + A15 + A16 | 4 |
| WME | Fact | Alpha nodes reached |
|---|---|---|
| 101 | (Cargo vin A1 bed flat) | A4, A8, A16 |
| 102 | (Passenger vin A1 limit 2) | A2, A6, A12 |
| 103 | (Passenger vin B2 limit 2) | A2, A6, A12 |
| 104 | (Passenger vin C3 limit 1) | A2, A6, A11 |
| 105 | (Power vin A1 hp 400) | A3, A7, A14, A15 |
| 106 | (Power vin B2 hp 800) | A3, A7, A13, A14 |
| 107 | (Power vin C3 hp 900) | A3, A7, A13, A14 |
| 108 | (Wheel vin B2 tyre regular) | A1, A5, A10 |
| 109 | (Wheel vin C3 tyre slick) | A1, A5, A9 |
Read one alpha chain top to bottom as one pattern: class, then vin, then the attribute test. A WME slides down every chain whose tests it passes and stops where a test fails. Cover the animation. Locate all nine WMEs, test the four candidate tuples at the betas, then pick by tests and by timestamps.
3b. Animation: the whole net from step 0, progress marked on it
Why this step
Tracker
3c. The three questions
A Rete net classifies machines. Alpha nodes test class, vin, then one attribute. Beta nodes B1, B2, B3 each require the vin \(\langle v \rangle\) to be equal across their inputs and feed rules F1-Car, Luxury-Car, Truck. WMEs in timestamp order:
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).
3d. Answers first, then the working
Conflict set: (F1-Car,104,107,109), (Luxury-Car,103,106,108), (Truck,101,102,105). Specificity fires (Truck,101,102,105). Recency fires (F1-Car,104,107,109).
| Candidate | Beta | Verdict |
|---|---|---|
| (F1-Car,104,107,109) | B1, vin C3 | A9 = {109}, A11 = {104}, A13 has 107. All C3. IN. |
| (Luxury-Car,103,106,108) | B2, vin B2 | A10 = {108}, A12 has 103, A13 has 106. All B2. IN. |
| (Truck,101,102,105) | B3, vin A1 | A15 holds only 105, forcing A1. 105 fills A14 and A15 at once. IN. |
| (Truck,101,103,106) | B3, split vin | 103 is B2 vs 101 is A1, and 106 (800) fails A15. OUT. |
Solve each with a pen before opening the answer. Each drill is self contained.
Rule R: (Wheel vin \(\langle v \rangle\)) + (Power vin \(\langle v \rangle\), hp \(\ge\) 700). WMEs: 201 (Wheel vin X), 202 (Power vin X hp 800), 203 (Power vin Y hp 900). Q: which tuples are in the conflict set: (R,201,202), (R,201,203)?
Why this step
Tracker
(R,201,202) only. (R,201,203) matches class and attribute tests but binds \(\langle v \rangle\) to X and Y at once, so the beta join rejects it.
Rule R: (Power hp \(\ge\) 700) + ¬(Wheel tyre slick), i.e. no slick-wheel WME may exist. Case A WMEs: 201 (Power hp 800), 202 (Wheel tyre regular). Case B adds 203 (Wheel tyre slick). Q: is R in the conflict set in each case?
Why this step
Tracker
Case A: in, via (R,201). Case B: out. The positive pattern still matches, but the negative pattern ¬(Wheel tyre slick) is violated by 203, so the whole rule is blocked.
Tuples in the conflict set: (Ra,209) with 2 tests, max timestamp 209; (Rb,201,202) with 5 tests, max timestamp 202. Q: which fires under specificity? which under recency?
Why this step
Tracker
Specificity fires (Rb,201,202) (5 tests beat 2). Recency fires (Ra,209) (209 beats 202). The two strategies can pick different winners; read which one the sub-question asks for.