The basal ganglia select which motor program to execute and suppress competing programs through antagonistic direct and indirect pathways. Early learning engages the prefrontal cortex; with practice, control shifts to the basal ganglia, forming habits. Overlearning of habits can become maladaptive (compulsions, addiction). Dopamine loss in Parkinson's disease impairs both action selection and habit formation.
From your study of basal ganglia motor selection and motor planning in the premotor cortex, you have a picture of how the motor system generates and coordinates movement. Now the question is: how does the brain decide *which* movement to make at any given moment, and how do repeated choices eventually become automatic? The basal ganglia sit at the center of both questions.
Think of the basal ganglia as a competitive selection mechanism, not a movement generator. At any moment, the brain has many possible motor programs ready to go — each one has been assembled upstream by cortical and cerebellar circuits. The basal ganglia's job is to act like a filter: suppress most of these programs and release only one. The two main pathways through the basal ganglia operate in opposition. The direct pathway releases a desired action: it disinhibits (removes the brake from) the selected motor program, allowing it to execute. The indirect pathway suppresses competing actions: it actively inhibits everything else, keeping unwanted movements from leaking through. You can think of it like a spotlight operator — the direct pathway turns up the light on the chosen action, and the indirect pathway darkens everything around it. Smooth, coordinated action requires both pathways working in balance.
Dopamine is the critical neuromodulator that biases this competition. The substantia nigra pars compacta (SNc), a nucleus within the basal ganglia complex, releases dopamine in response to reward prediction and motor activity. Dopamine strengthens the direct pathway (boosting the selected action) and weakens the indirect pathway (reducing suppression of competing actions). When dopamine is lost — as in Parkinson's disease, where SNc neurons die — the indirect pathway becomes dominant. The result is the characteristic Parkinson's symptom profile: bradykinesia (slowness), rigidity, and difficulty initiating movements. The action selection filter is stuck in a suppressive mode; actions that should execute easily require enormous effort to initiate.
Habit formation is the developmental story of this system. Early in learning a new skill, the prefrontal cortex is heavily involved — you are consciously planning each step, attending to each element of the sequence. With repetition, the striatum (the input nucleus of the basal ganglia) gradually encodes the action sequence as a single unit. Over thousands of repetitions, control shifts from cortex to basal ganglia; the habit becomes automatic and requires less cortical oversight. This chunking process is computationally efficient: the brain does not need to re-plan a well-practiced sequence from scratch each time. The downside is that this encoding is quite persistent — habits are hard to break not because of weak willpower but because the basal ganglia circuit encoding them changes relatively slowly. Maladaptive habits, compulsions, and addiction can all be understood as this same machinery applied to contexts where persistent, automatic behavior is harmful rather than helpful.