Q-Learning from scratch in Python