When learning something new, people naturally look to challenge themselves but the task should be too easy or too difficult, lest they get bored or give up.

Scientists from the University of Arizona say they have now found the “Goldilocks zone” – with their data suggesting people who fail 15 per cent of the time learn the fastest.

Researchers created machine-learning experiments in which they taught computers simple tasks like categorising patterns or arranging numbers. The computers learnt fastest when they got 85 per cent of answers correct, according to the paper published in Nature Communications.

“We show theoretically that training at this optimal difficulty can lead to exponential improvements in the rate of learning,” researchers wrote in the paper.