Foraging, memory, and constraints on learning.