Reinforcement learning in artificial and biological systems