The conditions of a chunk are determined by dependency analysis. This diagram, from Unified Theories of Cognition, illustrates the process of dependency analysis. The vertical, dotted lines represent consecutive decision cycles. Working memory elements added during each decision cycle are indicated by the circles. When an impasse occurs, a subgoal is created to resolve the impasse (not indicated in the figure) and Soar continues, with the context stack one goal deeper. The resolution of the impasse (the heavy line at the right) produces elements D and E. A backtracing procedure then works back from these elements to the working memory elements on the other side of the impasse that lead to their creation. Notice that 7 is not included as a condition in the final chunk. It was examined within the impasse but since it was not along the path that lead to the goal, it is not included.
Also notice that only A, B, and C are included in the conditions for the production. In particular, 7, 8, and 9 are not included even though they were created just before the impasse occurred. Similarly, elements 2, 4, and 6 are not included since they lead to working memory elements which were used in impasse resolution but that were created before the impasse occurred. This is important because it shows chunking's implicit generalization. If, in a future situation, condition elements A, B, and C occur, the resultant chunk shown at the bottom of the diagram will fire, regardless of the elements from which these condition elements were created.
These new chunks are placed in long-term memory immediately, and are available on the next elaboration phase, thus Soar's learning is intermixed with its problem solving.