The short answer
A frame is a labeled template for information about one thing. Think of it as a blank form with boxes. Each box has a name and holds a value. In artificial intelligence, a frame lets a program store facts about a concept in an organized way.
An everyday picture
Picture the form a library uses for a book: title, author, year, and whether it is on loan. The form has the same boxes for every book, and each one is filled in with that book’s details. A frame works in a similar way.
Another picture is a character sheet in a role-playing game. Each character has labeled fields, such as name, class and hit points. The sheet is the same shape for every character, but the values differ.
Slots and values
The boxes in a frame are called slots. The contents of the boxes are called values, or fillers. Here is a small frame for a person:
- Frame name: Person
- Slots: name, birth year, job
- Values: name is Ana, birth year is 1990, job is teacher
The slots tell you what kind of information the frame holds. The values tell you what is known about one particular person.
Frames can inherit
A frame can link to a more general frame. A Mammal frame might say that mammals usually have hair. A Dog frame is a kind of Mammal, so it inherits that default unless it says otherwise. The program does not need to be told about hair again for dogs.
Frames can hold defaults
A default is a value a frame assumes when nothing more specific is known. If a Dog frame says legs default to 4, a program can answer 4 for a dog it knows little about. If a particular dog’s frame says legs is 3, the specific value wins. Three-legged dogs exist, so the more specific value is the correct one.
How a frame differs from a spreadsheet row
A row in a spreadsheet or database table has fixed columns. A frame is more flexible. It can link to other frames, supply default values and inherit values from more general frames. A frame is less like a single row of data and more like a small, linked description of a concept.
Why AI uses frames
Frames help a program organize what it knows about a type of thing and then reason with that knowledge. Marvin Minsky proposed the idea in 1974. Frames were used in early expert systems and in language programs that needed to fill in the typical details of a situation.
Frames are one of several knowledge representation approaches in ai, alongside rules and logic.
Frames versus machine learning
Frames hold knowledge that people enter. A machine learning model, by contrast, learns its patterns from data. Both are part of AI, but they work very differently. Keeping that difference in mind makes the rest of the field easier to follow.
Where to go next
For worked examples and the full picture, see frame based system in artificial intelligence examples. It walks through a vehicle example, defaults and exceptions, and the limits of frame systems.