The Limits of Learning: Exploration, Generalization, and the Development of Learning Traps