When learning a new task, both rats and humans exhibit suboptimal behaviors plagued with superstitious ticks and idiosyncratic biases. One prominent example of such suboptimality are sequential effects: animals tend to bias their choices based on previous decisions and outcomes, hindering performance in common laboratory tasks using independent trials. Recurrent neural networks (RNN) have become a common tool to study potential neural mechanisms of cognition. Yet, RNNs typically behave much closer to optimality in laboratory tasks than real subjects. We suggest this behavioral difference is rooted in the fundamental discrepancy between how animals and current RNNs learn: unlike animals before learning, RNNs before training are tabula rasa and their connectivity is adjusted exclusively to the local contingencies of the task. We hypothesize that animals’ learning of simple laboratory tasks builds mostly on pre-existing programs, namely structural prior, that have been shaped by evolution for the species’ fitness in a given ecological niche. Sequential effects are a manifestation of such pre-wired strategies, which may ultimately support learning. To test this, we will characterize sequential effects during learning of a set of perceptual tasks and identify their underlying neural circuitry. We will compare animals’ behavior with RNNs which, after being equipped with structural priors, can mimic the animal’s ability to learn new tasks. Objectives Objective 1. Compare sequential effects in humans and rats with those developed by RNNs. Objective 2. Characterize the role of the corticostriatal circuit mPFC --> DMS in the tasks and the site of plasticity necessary for task learning. Objective 3. Characterize the neural mechanisms underlying the representation of relevant variables in the brain of the rat and in RNNs.