Reinforcement learning in javascript!