QLearning fully tested, works like a charm