Q-learning finished in code. Needs to be tested.