Implemented the learning algoritm Second order equation along with the
training algorithm random greedy.