To understand the neural basis of behavior, neuroscience has often opted to investigate simple behaviors in well controlled lab settings. This reductive approach has been very successful, but it also carries limitations. For example, us and others have seen that neural activity during a complex task (e.g. navigation-based decision-making) can be qualitatively different from the activity during a simple assay(e.g. Pavlovian conditioning). On the other hand, completely unconstrained, natural behavior can be very hard to analyze and understand. In the lab, we take an intermediate approach. We focus on relatively complex behaviors that are nevertheless constrained enough to enable their analysis. We use statistical and machine-learning approaches to parse out the complexity of the behavior, and state of the art optical and electrophysiological tools to record neural activity at high resolution. We have a particular focus on the brain's dopamine system, which has been shown to be involved in a large number of cognitive and behavioral processes. Our goal is to advance our understanding of the involvement of dopamine circuits in complex behavior and more generally to understand how behavioral complexity can arise (and give rise to) complexity in the activity of neural circuits.