How Reinforcement Learning Work