The primate basal ganglia receives information from most of the cerebrum, including the frontal cortex, but projects (via the dorsal thalamus) primarily to the frontal lobe, perhaps in its entirety. As such, the frontal cortex and basal ganglia constitute an integrated, distributed neuronal architecture. We review evidence that the frontal lobe and basal ganglia specialize in different, but related, aspects of response learning. Frontal cortex acts when new rules need to be learned and older ones rejected, whereas the basal ganglia potentiate previously learned rules based on environmental context and reinforcement history. Such potentiation increases the probability that the central nervous system will select a particular rule to guide behavior. We outline a possible mechanism for the basal ganglia's proposed role in rule potentiation, one that involves both the direct and indirect striatal output pathways and their dopaminergic input. It has previously been proposed that direct-pathway neurons recognize a pattern of corticostriatal inputs, which promotes activity in recurrent, positive-feedback modules (or loops) of which they are an integral part. We propose that this recurrent activity potentiates a rule associated with those modules. If so, then the dopaminergic system is well situated and organized to modulate rule potentiation in both the short and long term. Dopaminergic neurons of the midbrain increase activity during learning and other periods of relatively unpredictable reinforcement. Dopamine enhances gene expression and other forms of activity in striatal neurons of the direct pathway, while suppressing neurons of the indirect pathway. In the short term, then, dopamine may augment the activity of modules triggered by a recognized context, whereas in the long term it may promote context-dependent activation of the same modules. Together, these modulatory influences could support both rule potentiation and learning the context for potentiating that rule.