Back to optimality: a formal framework to express the dynamics of learning optimal behavior. (August 2015)