Developmental changes in learning resemble stochastic optimization