Go backward to Determining a chunk's actions.
Go up to Determining conditions and actions.
Go forward to Determining a chunk's conditions.

Tracing the creation and reference of working memory elements
-------------------------------------------------------------

 
Soar automatically maintains information on the creation of each preference
and working memory element in every goal. (The trace for a preference can be
displayed using the preferences user-interface command.  See Section 
See preferences on page See preferences.) When a production fires, a trace
of the production is saved with the appropriate goal.  A *trace* is a list of
the working memory elements matched by the production's conditions, and the
preferences created by the production's actions.  The appropriate goal is the
most recently created goal (i.e., the goal *lowest* in the subgoal hierarchy)
that occurs in the production's matched working memory elements.

Chunking is complicated by the fact that the ^$item augmentation of the
subgoal is created by the architecture and not by productions.  Backtracing
cannot determine the cause of these subgoal augmentations in the same way as
other working memory elements.  To overcome this, Soar maps these
augmentations onto the acceptable preferences for the objects in the {^$item}
augmentations.

Negated conditions are included in a trace in the following way: when a
production fires, its negated conditions are fully instantiated with its
variables' appropriate values.  This instantiation is based on the working
memory elements that matched the production's positive conditions.  If the
variable is not used in any positive conditions, such as in a conjunctive
negation, a dummy variable is used that will later become a variable in a
chunk.

If the identifier used to instantiate a negated condition's identifier field
is linked to the supercontext, then the instantiated negated condition is
added to the trace as a negated condition.  In all other cases, the negated
condition is ignored because the system cannot determine why a working memory
element *was not* produced in the subgoal and thus allowed the production to
fire.  Ignoring these negations of conditions internal to the subgoal may
lead to overgeneralization in chunking (see Section *Note Problems with
chunking:: on page See Problems with chunking).