Frames — Beginner-Friendly Notes
1. What a Frame Is
Frame = object-like data structure for a concept/situation, with slots (attributes) and fillers (values), plus defaults, procedures, and inheritance. Invented by Minsky — "a frame is a stereotyped situation".
Think: a Frame is like a class/object in programming, but invented for AI knowledge.
2. Anatomy of a Frame (example: Bird)
Frame: Bird
IsA: Animal
Slots:
Legs: 2 (default)
Feathers: true
CanFly: true (default)
Habitat: air/land
Procedures:
IfAdded: add to bird count
IfNeeded: compute wingspan
Instance frame:
Frame: Tweety
InstanceOf: Canary (→ Bird)
Colour: yellow
CanFly: true (inherited unless overridden)
3. Key Features
- Slots + fillers: e.g.,
Colour: yellow,Owner: John. - Defaults:
CanFly: trueunless overridden (handles "penguin doesn't fly"). - Inheritance: instance inherits slot values from parent frames via IsA/InstanceOf.
- Demons / Procedural attachments:
- If-Needed: compute value when asked (e.g.,
Age: if-needed = currentYear - birthYear) - If-Added / If-Removed: trigger actions when slot filled.
- If-Needed: compute value when asked (e.g.,
- Constraints: slot may have type, range, cardinality (e.g.,
Legs ∈ {0,2,4}).
4. Reasoning with Frames
- Inheritance: fill missing slots by traversing parent frames.
- Default reasoning: use default unless explicit value exists lower — non-monotonic (can retract).
- Matching: find frame whose slots match percept (e.g., "yellow canary" matches Tweety frame).
5. Frames vs Semantic Nets vs Logic
| Best For | Weak For | |
|---|---|---|
| Semantic Nets | Simple IsA hierarchies | Detailed defaults/procedures |
| Frames | Rich objects with defaults + triggers | Formal precise semantics |
| FOL | Precise quantification, arbitrary rules | Intuitive objects |
Frames sit between nets and logic — richer than nets, more structured than pure logic.
6. Limitations
- Semantics still informal (what does inheritance mean formally?).
- Large KBs hard to maintain.
- Modern descendants: description logics, OWL, object-oriented KR.
7. One-Line Summary
Frames represent stereotyped entities as slot-filler structures with defaults, inheritance and procedural attachments, enabling concise object-centred knowledge with default reasoning but with weaker formal semantics than logic.
8. Quick Self-Check
- What is a slot and what is a filler in Bird frame?
- How does a penguin frame override the default CanFly?