O&O ConsultingBook a free call

Home / Insights / AI Foundations

Reinforcement Learning: Learning by Trial, Error and Reward

Agents, rewards and exploration, from Atari games to board games, and why the real world is harder.

O&O Consulting · · 2 min read

Students working through a problem

Supervised learning is told the right answer. Reinforcement learning is told only how well things turned out, often long after the decisions that mattered.

The framework

An agent observes a state, takes an action, and receives a reward and a new state. Its strategy is called a policy. The aim is to maximise total reward over time, usually with later rewards weighted somewhat less. The mathematical setting is the Markov decision process.

Two difficulties are central. Credit assignment: which earlier move led to a win? Exploration versus exploitation: should the agent try something new, or repeat what has paid off?

The reinforcement learning loopIllustrative diagram, not data
Agent observes the stateAgent chooses an actionEnvironment changesAgent receives a rewardand the loop repeats
Agent observes the stateAgent chooses an actionEnvironment changesAgent receives a rewardand the loop repeats

Diagram by O&O Consulting.

Landmark results

In 2015 DeepMind's deep Q-network learned to play many Atari games from screen pixels and scores, using one architecture across games. In 2016 AlphaGo defeated a leading professional at Go by combining neural networks with tree search, after training on human games and self-play. A successor, AlphaZero, learned chess, shogi and Go from self-play alone, given the rules.

Games suit the method: rules are fixed, outcomes are clear and millions of trials are cheap.

Outside games

Applications include controlling industrial systems, allocating computing resources and tuning language models from preference signals. Yet real environments allow far fewer experiments, mistakes carry costs, and simulators differ from reality. Methods that learn from previously recorded data, known as offline reinforcement learning, try to reduce risky experimentation.

Reward design

The agent optimises exactly what is measured. A system rewarded for clicks may promote outrage; a cleaning agent rewarded for not seeing dirt could learn to avoid looking. Writing a reward that captures what people actually value is often the hardest part of the project.

Limitations and open questions

Reinforcement learning can be unstable, sensitive to settings and expensive in data. Guarantees about safe behaviour during learning are limited. For many business problems, a prediction model combined with a simple decision rule, or a contextual bandit that learns from immediate feedback, is more practical.

References

  • Sutton, R. S. and Barto, A. G. (2018). Reinforcement Learning: An Introduction, 2nd edition. MIT Press.
  • Mnih, V. et al. (2015). "Human-level control through deep reinforcement learning." Nature. doi.org/10.1038/nature14236
  • Silver, D. et al. (2016). "Mastering the game of Go with deep neural networks and tree search." Nature. doi.org/10.1038/nature16961

This article is general information, not financial, legal or investment advice. AI research and rules change quickly; check the cited sources for the current position.