Back to Study Material Machine Learning

Reinforcement learning

Reinforcement learning takes a fundamentally different approach from supervised and unsupervised methods. An agent interacts with an environment, takes act...

Reinforcement learning

Learning Through Reward and Consequence

Reinforcement learning takes a fundamentally different approach from supervised and unsupervised methods. An agent interacts with an environment, takes actions, and receives rewards or penalties based on the outcomes. Over time it learns a policy — a strategy for choosing actions — that maximizes cumulative reward.

The key components are the agent (the learner and decision-maker), the environment (everything the agent interacts with), the state (the current situation), the action (what the agent does), and the reward (the numerical signal indicating how good the action was). The agent explores different actions, observes the rewards, and gradually refines its policy.

Reinforcement learning excels in sequential decision problems where the right action depends on long-term consequences rather than immediate outcomes. A chess-playing agent does not benefit from winning a single piece if it ultimately loses the game. The algorithm must learn to evaluate moves by their contribution to eventual victory, even many steps ahead.

Training a reinforcement learning agent can be extremely data-hungry. AlphaGo, DeepMind's Go-playing system, played millions of games against itself before reaching superhuman performance. This is feasible for games but challenging in real-world settings where each interaction has a cost or safety risk, such as training a robot or an autonomous vehicle.

A concrete example: a reinforcement learning agent controlling a heating system in a building. Its actions are heating adjustments, its reward is a combination of occupant comfort ratings and low energy cost. Over many days it learns an efficient schedule tailored to the building's usage patterns.

Exam tip: understand the exploration-exploitation tradeoff — the agent must try new actions to discover better strategies (exploration) while also using what it already knows works (exploitation). Balancing these is central to most reinforcement learning algorithms.