This work presents a modular neural-network model (based on reinforcement-learning actor–critic methods) that tries to capture some of the most relevant known aspects of the role that basal ganglia play in learning and selecting motor behavior related to different goals. The model uses a mixture of experts network for the critic and a hierarchical network with two levels for the actor. Some simulations with the model show that basal ganglia select ‘chunks’ of behavior whose ‘details’ are specified by direct sensory-motor pathways, and how emergent modularity can help to deal with tasks with asynchronous multiple goals. A ‘top-down’ approach is adopted that first analyses some adaptive non-trivial interaction of a whole (simulated) organism with the environment, and its capacity to learn, and then attempts to implement these functions with neural architectures and mechanisms that have an empirical neuroanatomical and neurophysiological foundation. 2002 Elsevier Science B.V. All rights reserved.