Optimization of repetition spacing in the practice of learning