Quiz 2

🧠 Rule-Based Expert Systems

214 words
1 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# 🧠 Rule-Based Expert Systems ## 1. 🎯 Learning Objectives - Trace the Match-Resolve-Execute cycle - Apply Specificity, Recency, and Refractoriness for conflict resolution - Explain Rete net construction and token propagation ## 2.

🧠 Rule-Based Expert Systems

1. 🎯 Learning Objectives

  • Trace the Match-Resolve-Execute cycle
  • Apply Specificity, Recency, and Refractoriness for conflict resolution
  • Explain Rete net construction and token propagation

2. 📖 Core Content

3.1 Architecture

  • Knowledge Base: IF-THEN rules
  • Working Memory: Current facts
  • Inference Engine: Match-Resolve-Execute cycle

3.2 Match-Resolve-Execute Cycle

text
repeat:
    // MATCH
    conflict_set = [rule for rule in KB if all premises match WM]
    // RESOLVE
    selected = resolve(conflict_set)
    if none: break
    // EXECUTE
    add conclusions of selected to WM

3.3 Conflict Resolution

StrategyRulePriority
SpecificityMore conditions = more specificHigher
RecencyMatches newer factsHigher
RefractorinessCannot fire twice on same factsPrevents loops

3.4 Rete Algorithm

Builds a network where:
  • Alpha nodes: Test single conditions
  • Beta nodes: Join conditions (merge two matches)
  • Terminal nodes: Complete rule matched Token propagation: When a fact enters the network, it flows through matching alpha nodes, gets stored in beta memories, and triggers terminal nodes when all conditions match.

4. 📝 Practice Questions

Q1: Rules: R1(A->X), R2(A&B->Y), R3(A&C->Z). WM: A(old), B(new), C(older). Which fires with Specificity? With Recency?
Answer: Specificity: R2 and R3 tie (both 2 conditions), R1 loses. Recency: R2 matches newest fact (B), so R2 fires. Join Discord PreviousGraphplan & PSPNextCSP & AC-3
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.