Resilience in learningand control