A universal challenge faced by the animal kingdom is to gather limited resources from an uncertain environment. By tracking statistical changes in resource availability, animal brains have evolved to behaviorally optimize the return on energy invested, but how the brain achieves this remains unknown. Our goal is to identify which neural circuits control foraging decisions across species, and to understand how these circuits malfunction in mental illness.