Biological systems display a high degree of flexibility in problem solving. In this paper a model is presented, Distributed Adaptive Control III (DACIII), which is aimed at understanding these forms of behavior. DACIII is part of a larger modeling series directed at understanding how biological systems acquire, retain, and express knowledge of the world. This modeling series has its roots, on one hand, in the methodological consideration that brain and behavior need to be modeled from a multi-level perspective. On the other, the importance of the acquisition of representations of events in the world, as opposed to an a priori specification, is emphasized. DACIII is presented against the background of the paradigms of classical and operant conditioning. On the basis of an analysis of these experimental approaches towards the study of animal behavior a theoretical framework is defined aimed at identifying the minimal requirements of a control structure which could display these behaviors. The proposed model is evaluated in different configurations using both simulated and real robots. It is demonstrated that DACIII is able to fully bootstrap itself from a mode of control which solely relies on proximal sensors and predefined reflexes, to a level of control which is dominated by acquired representations of events transduced by distal sensors. This transition is reflected in the performance of the behaving device, from strongly variable trajectories to highly structured behavioral sequences. The results are compared with alternative models of classical and operant conditioning and models which attempt to capture the properties of its underlying neural substrate.