Reinforcement learner now seems to work