# What is Reinforcement Learning? Also called RL. Reinforcement learning is a machine learning approach in which an agent learns by interacting with an environment and receiving numerical rewards for the outcomes of its actions. The goal is a policy, meaning a mapping from observed states to actions, that maximizes cumulative reward over time. Learning proceeds through trial, feedback, and revision rather than from labeled examples. The standard formalism is the Markov decision process, defined by states, available actions, transition dynamics, and a reward function. A discount factor expresses how much future reward is worth relative to immediate reward. Value based methods estimate the long run return of states or actions, while policy gradient methods adjust the parameters of the policy directly toward higher expected reward. A defining difficulty is the tradeoff between exploration and exploitation. An agent that always takes the action currently believed best may never discover a better one, while an agent that explores constantly collects little reward. Credit assignment is a second difficulty, since a reward arriving long after a decision must be attributed back to the actions that caused it. Reward specification is where most practical failures originate. Agents optimize the reward as written, not the intention behind it, so an imprecise signal produces behavior that scores well and misses the point, a pattern known as reward hacking or specification gaming. Careful reward design, explicit constraints, and evaluation against held out objectives are the standard mitigations. Applications include game playing, robotics control, resource scheduling, and recommendation. In language modeling, learning from human preference comparisons uses reinforcement learning to align a pretrained model with rated responses. Sample efficiency and safe exploration remain limits, which is why much training happens in simulation before deployment to any physical or costly environment. ## Key points - Agent learns from rewards while acting in an environment. - Goal is a policy maximizing long run cumulative reward. - Balances exploring new actions against exploiting known ones. - Poorly specified rewards produce gamed behavior. - Used in control, games, and preference based model tuning. ## In practice A warehouse routing agent receives a small penalty for every second of travel and a reward for each completed pickup. Early on it wanders, then it learns shorter paths that raise its score. If the reward counts only pickups, the agent may ignore battery limits, so designers add a penalty for low charge, which changes the learned behavior. ## Related terms - [Reinforcement Learning from Human Feedback](/en/glossary/reinforcement-learning-from-human-feedback) - [Machine Learning](/en/glossary/machine-learning) - [Alignment](/en/glossary/alignment) - [AI Agent](/en/glossary/ai-agent) - [Supervised Learning](/en/glossary/supervised-learning) [Back to the AI Glossary](/en/glossary)