Functional architecture (Left) and single-unit activity (Right) during the resolution of a problem of intermediate difficulty. Following the presentation of initial and goal states, the network compares them and activates one “remaining goal” unit for each misplaced bead (Top). The total activity of “remaining goals” units being positive, the “motivation” unit activates, followed by the “store” plan unit, resulting in the storage of the initial state in “working memory” units. The “move” plan unit then activates, triggering a cascade of activation through which an operation is selected and the corresponding sequence of two gestures is executed. The first operation thus selected happens to be inadequate, because the resulting state is even farther from the goal (the black bead occupies the desired location of the gray bead). Hence, the total activity of “remaining goals” units increases, which results in the activation of the “error” unit and the “retreat” plan unit, causing the withdrawal of the previous move and the restoration of the initial state from working memory. A second operation is then performed, immediately followed by a third operation that places the gray ball at its desired final location. The current state is now judged closer to the goal, as signaled by the activation of the “correct” unit. The “store” unit therefore is activated, again storing the current state in working memory. Finally, the final direct move is performed, making the current state identical to the goal. Because of this match, the “motivation” unit switches off and activity ceases in all layers. In the lower graph, single-unit activity curves were scaled by an arbitrary factor and superimposed to show the temporal nesting of lower-level units by successively higher levels.