What makes humans such remarkable learners? Namely, why is the rate at which we learn and adapt to new tasks and different environmental challenges so remarkably different from other animals? The algorithms and neural structures which arise to enable the brain to exhibit such versatility are not well known, but are fundamental to creating intelligent agents which behave and think like humans. Discovering, understanding, and finally harnessing the nature of this discrepancy is the focus of my research. I accomplish this by situating flexible Deep Neural Network models in realistic simulated physical environments that model the true physical apparatus and tasks that animals and humans interact with in neuroscience and psychophysics experiments. Using these models and exposing them to streams of tasks which vary in complexity, length, and structure, allow us to probe the mechanisms involved in task-switching and therefore develop dynamic models of brain regions associated with cortical flexibility.