First realization of learning algorithm