Biological constraints and mechanisms for reinforcement learning