Frames and Frame Systems

 Many of the ideas about frame systems were first introduced in a chapter by Marvin A. Minsky, entitled "Framework for Representing Knowledge," which appeared in P. H. Winston (Ed.), The Psychology of Computer Vision. NY: McGraw-Hill, 1975. Pp. 211-277. In this chapter Minsky introduces and argues for the idea of representing common sense knowledge in a data-structure that he calls a frame. His motivation for introducing these ideas is indicated immediately at the start of this chapter where he states:

"It seems to me that the ingredients of most theories both in artificial intelligence and in psychology have been on the whole too minute, local and unstructured to account­either practically or phenomenologically­for the effectiveness of common sense thought. The "chunks" of reasoning, language, memory and "perception" ought to be larger and more structured, and their factual and procedural contents must be more intimately connected in order to explain the apparent power and speed of mental activities."

A frame is a data-structure for representing a stereotyped situation, like being in a certain kind of living room, or going to a child's birthday party. Attached to each frame are several kinds of information. Some to this information is about how to use the frame. Some is about what one can expect to happen next. Some is about what to do if these expressions are not confirmed.

We can think of a frame as a network of nodes and relations. The "top levels" of a frame are fixed, and represent things that are always true about the supposed situation. The lower levels have many terminals-"slots" that must be filled by specific instances or data. Each terminal can specify conditions its assignments must meet. (The assignments themselves are usually smaller "subframes.") Simple conditions are specified by markers that might require a terminal assignment to be a person an object of sufficient value, or a pointer to a sub-frame of a certain type. More complex conditions can specify relations among things assigned to several terminals.

Collections of related frames are linked together into frame systems. The effects of important actions are mirrored by transformations between the frames of a system. These are used to make certain kinds of calculation economical, to represent changes of emphasis and attention, and to account for the effectiveness of imagery."

   As these ideas were realized in various "frame systems," a rough agreement emerged concerning exactly what constituted a frame . Below is listed these components. A frame is a data structure that typically consists of:

  • Frame Name
  • slot-filler (relations target)
    • default values
    • constraints on values within the slots of a frame
  • pointers (links) to other Frames
    • ako (a-kind-of)
    • instance (is-a)
  • Instantiation Procedure
    • Inheritance Procedure
    • Default Inference Procedure
    • Consistency Checking Procedure
    • Inconsistency Resolution Procedure

Note that knowledge is organized around the objects. The knowledge is accessed when an instance of a particular object is created or instantiated. Instantiation can be an extremely rich and complicated procedure as can be noted by reviewing the various procedures that are listed above as part of the instantiation procedure. Additionally, instantiation is typically specialized with respect to classes of objects. For example, the procedure for instantiating a restaurant script would probably differ from a script for repairing bicycles.


An Example

   A brief example of an instantiation process is shown in the table below. This example is a trace recorded long ago (in the late 70's or early 80's) taken from a frame system, AIMDS, developed for use in research on plan recognition. (Schmidt, C.F., Sridharan, N.S. & Goodson, J.L. The plan recognition problem: An intersection between psychology and artificial intelligence. Artificial Intelligence, 1978, ll, 45-83.) For those unfamiliar with programming; most programming languages give one some facility create a record of chosen aspects of a procedure. In this example, certain component functions of the process were chosen and the result returned by these component function is printed as the function is exited.

   In this particular example, the instantiation process is specialized for frames that represent actions which modify a world. The table below lists the definition provided the system for the two frames used in this example. The first is the frame referred to as ACT. The second is the frame referred to as WALK. WALK is a kind of ACT. When a WALK is instantiated an ACT representation is also created for that instance of ACT. In this example we will focus on the frame, WALK. The strings TDN: and QSCC: that occur in these tables are simply the name of functions that are invoked to create these data structures when this knowledge is entered.

   Beneath the name of the frame is listed the set of slots that are associated with the frame. For WALK, the first slot is (AGENT PERSON) the next (LOC LOCATION) and so on. The terms shown in bold (PERSON, LOCATION, and so one) are other frames which themselves would typically be further defined. The term proceeding these is the name of the relation or slot­AGENT and LOC in these first two elements. Thus, this is a way of specifying that WALK is a kind of ACTION which involves an agent who is a PERSON, and so on.

An Example Pair of Frames: ACT and WALK

(* STRUCTURAL DESCRIPTION OF THE ACT FRAME *)
(TDN: [  (ACT D)   
 
((PRESUPPOSITIONS L) PROPOSITION)
 ((RESULTS L) PROPOSITION)
((OUTCOMES L) PROPOSITION)
((PRECONDITIONS L) PROPOSITION)
((ENABLE L) ACT ENABLEDBY)
((MOTIVATES L) ACT MOTIVATESOF) ] )
 

(* STRUCTURAL DESCRIPTION OF THE WALK FRAME *)
(TDN: [  (WALK P A)  
 
( (AGENT I FN) PERSON)
(LOC LOCATION)
( (TOLOC I FN) LOCATION)
(FROMLOC LOCATION)
( (OPPORTUNITY L) (PROPOSITION ( (X AGENT) LOC (X FROMLOC) ) ) )
(PGOAL (PROPOSITION ( (X AGENT) LOC (X TOLOC) ) ) )
( (PRESUPPOSITIONS L) PROPOSITION)
( (RESULTS L) PROPOSITION) ] )
 

(* CONSISTENCY CONDITIONS FOR THE WALK FRAME *)
(QSCC:   [( (LOCATION Z) | (NOT [X TOLOC Z]) (X (AGENT LOC) Z) ) WALK FROMLOC] )  
(QSCC:   [( (LOCATION L) | (X TOLOC L) (NOT [X FROMLOC L]) ) WALK TOLOC] )  
 (QSCC:   [( (LOCATION L) | (X FROMLOC L) ) WALK LOC] )  
 (QSCC:   [( (PERSON P) | (X (LOC LOCOF) P) ) WALK AGENT] )  

   The final segment of the table above lists what are referred to as consistency conditions; in this case for the WALK FRAME. These are expressions that are given a logical interpretation and constrain the way in which a WALK instance can be instantiated. Note that at the end of each of these lines the name WALK and a relation or slot are shown in bold. For example the first is WALK FROMLOC. This constraint expression is attached to this slot. For example, the first constraint states that the LOCATION Z that is placed in the fromloc slot is a location such that Z is not the same as the location placed in the toloc slot; and it is the LOCATION that is in the slot loc that is associated with the PERSON P in the agent slot of WALK. More simply put; when you walk you must change location and the starting location of the Walk is the same as where you are when you begin this action.

    Note that all of this information that has been associated with these frames could be stated in first order logic. In fact the syntax of this form can be easily translated into the syntax of first order logic. The significance is that the information is grouped and that the procedure that instantiates an instance of a WALK has direct access to the information that has been grouped. The table below provides a trace of the procedure referred to as INSTANTIATE. The lowlevel functions ADD: and REMOVE: have been traced in order to follow the creation of the instantiated instance of WALK. In this case the arguments given to this procedure are ( WALK (AGENT JOHN) (TOLOC L2 ]. That is, we wish to represent that "John walked to L2."

Trace of the Instantiaion of "John walked to L2"

*(INSTANTIATE

( WALK(AGENT JOHN) (TOLOC L2 ]  

ADD:
ADD:
ADD:
ADD:

(WALK INSTANCE (WALK-1) )
(WALK-1 WALK-AGENT-PERSON JOHN )
(JOHN PERSON-AGENTOF-WALK WALK-1)
(L2 TOLOCOF-WALK WALK-1)
 
 
(WALK-1 WALK-TOLOC L2 )
(RESIDUE 1)
(Q AND (NOT [ X WALK-TOLOC Z ] ) )
BINDINGS
[ Z [ L2 (X WALK-1) ] ]
(X ( WALK-1
(L L2) ) )
 

ADD:
ADD: 
( (WALK-1 WALK-FROMLOC L2) . 0 )
( (L2 FROMLOCOF-WALK WALK-1) . 0 )
 
 
 ( WALK-1 WALK-FROMLOC L2 )
(RESIDUE 1)
(F AND (NOT [ X WALK-TOLOC Z ] ) )
BINDINGS
[ Z [ L2 (X WALK-1) ] ]
(X ( WALK-1
(L L2) )
)
 
ADD:
ADD:
ADD:
ADD:
ADD:
ADD:
ADD:
ADD:
ADD:
ADD:
ADD:
(ACT INSTANCE (ACT-7) )
(ACT-7 ACT-ACTTYPE-WALK WALK-1 )
(WALK-1 WALK-TYPEOF-ACT ACT-7 )
(ACT-7 ACT-AGENT-PERSON JOHN)
(JOHN PERSON-AGENTOF-ACT ACT-7 )
(PERSON-LOC-4 DESIGNATOR (JOHN PERSON-LOC L2) )
(PERSON-LOC-4 DESIGNATOR (L2 LOCOF-PERSON JOHN) )
(WALK-1 WALK-PGOAL PERSON-LOC-4 )
(PERSON-LOC-4 PGOALOF-WALK WALK-1 )
(WALK-1 WALK-OUTCOMES PERSON-LOC-4 )
(PERSON-LOC-4 OUTCOMESOF-WALK WALK-1 )
 
ADD:
ADD:
REMOVE:
REMOVE:
(L1 FROMLOCOF-WALK WALK-1)
(WALK-1 WALK-FROMLOC L1)
( (WALK-1 WALK-FROMLOC L2) . 0 )
( (L2 FROMLOCOF-WALK WALK-1) . 0 )
 
  ***PRECONDITION State Difference Computed
***No assertions were removed
 
 ***Added assertions are:    
  (WALK INSTANCE (WALK-1) )
(WALK-1 WALK-AGENT-PERSON JOHN)
(JOHN PERSON-AGENTOF-WALK WALK-1)
(WALK-1 WALK-TOLOC L2)
(L2 TOLOCOF-WALK WALK-1)
(ACT INSTANCE (ACT-7) )
(ACT-7 ACT-ACTTYPE-WALK WALK-1)
(WALK-1 WALK-TYPEOF-ACT ACT-7)
(ACT-7 ACT-AGENT-PERSON JOHN)
(JOHN PERSON-AGENTOF-ACT ACT-7)
(WALK-1 WALK-PGOAL PERSON-LOC-4)
(PERSON-LOC-4 PGOALOF-WALK WALK-1)
(WALK-1 WALK-OUTCOMES PERSON-LOC-4)
(PERSON-LOC-4 OUTCOMESOF-WALK WALK-1)
(L1 FROMLOCOF-WALK WALK-1)
(WALK-1 WALK-FROMLOC L1)
 
 
***Now Computing OUTCOMES
 
ADD:
ADD:
REMOVE:
REMOVE:
(JOHN PERSON-LOC L2)
(L2 LOCOF-PERSON JOHN)
(JOHN PERSON-LOC L1)
(L1 LOCOF-PERSON JOHN)
 
  ***OUTCOME State Difference Computed  
***Removed assertions are:  
  (JOHN PERSON-LOC L1)
(L1 LOCOF-PERSON JOHN)
 
***Added assertions are:    
  (JOHN PERSON-LOC L2)
(L2 LOCOF-PERSON JOHN
 
ADD:
ADD:
ADD:
ADD:
ADD:
(PERSON-LOC-5 DESIGNATOR (JOHN PERSON-LOC L1) )
(PERSON-LOC-5 DESIGNATOR (L1 LOCOF-PERSON JOHN) )
(WALK-1 WALK-PRESUPPOSITIONSOF-WALK WALK-1)
(WALK-1 WALK-PRESUPPOSITIONS PERSON-LOC-5)
(WALK-1 WALK-RESULTS PERSON-LOC-4)
(PERSON-LOC-4 RESULTSOF-WALK WALK-1)
 

 *( SHOW JOHN )

   

 

(JOHN PERSON-LOC L2)
(JOHN PERSON-AGENTOF-ACT ACT-7)
(JOHN PERSON-AGENTOF-WALK WALK-1)
 

 *( SHOW L2 )

   
  (L2 LOCOF-PERSON JOHN)
(L2 TOLOCOF-WALK WALK-1)
 

 *( SHOW L1 )

   
   (L1 FROMLOCOF-WALK WALK-1)  

   In the trace above the left column contains the names of procedures that are executed. Those that are proceeded by an * are procedures that were initiated at the top level by the user. The first such is the procedure INSTANTIATE. The second column of the table shows various expressions being added and a few being removed reflecting the systems set of beliefs about the consequence of this action. The forms shown in maroon illustrate the evaluation of the consistency conditions associated with the slots of the WALK frame. The trace of the INSTANTIATE procedure ends at the horizontal line. Below that line the procedure SHOW is invoked. This procedure retrieves information associated with the argument given to this procedure.


Knowledge Representation - Table of Contents

 © Charles F. Schmidt