Fixed important bug on previous assignment.
Implemented Q-learning algorithm.