What is reinforcement learning?
Reinforcement learning is a type of machine learning in which an agent learns how to act by interacting with an environment and receiving rewards or penalties for its actions.
Instead of learning from a fixed set of correct labels, the agent learns through trial and error.
Core idea
A reinforcement learning system usually involves:
- Agent: the learner or decision-maker
- Environment: the world the agent interacts with
- State: the current situation the agent observes
- Action: a choice the agent can make
- Reward: feedback that indicates how good or bad an action was
The interaction can be simplified as:
State → Agent chooses action → Environment changes → Reward → New stateOver many interactions, the agent learns a policy, which is a strategy for choosing actions in different situations.
Simple example
Imagine an agent learning to play a game.
It observes the current game state, chooses a move, and receives feedback based on what happens. Actions that help it win may produce positive rewards, while poor actions may lead to lower rewards or penalties.
By repeating this process, the agent learns which actions tend to produce better long-term outcomes.
What makes reinforcement learning different?
Reinforcement learning focuses on sequential decisions. An action may affect not only the immediate reward but also future situations and future rewards.
The goal is therefore usually to maximize the total reward accumulated over time, not simply to make one correct prediction.
In short, reinforcement learning teaches an agent to make better decisions through interaction, feedback, and repeated experience.
Learning Sequence
Machine Learning Curriculum
What is the difference between supervised and unsupervised learning?
Explore Related Questions
Deepen your understanding across related Machine Learning topics.