Skip to main content

What is reinforcement learning?

The Harvard Chan AI Glossary

In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.

Reinforcement learning is a way of teaching a computer system to make decisions by giving it feedback on the results of its actions. It is a method of machine learning, which is a method of achieving artificial intelligence. Rather than supplying the correct answer at every step, we give the system a numerical score, called a reward. It learns to choose actions that are expected to produce better scores over time.

Imagine teaching a computer to play a maze game. It can move left, right, forward or backward. Reaching the exit earns a reward; taking unnecessary steps might reduce its score. At first, it tries moves that lead nowhere. Across repeated attempts, it can learn which choices bring it closer to the exit.

Researchers call the decision-making system an agent. The world it interacts with is its environment: a game board, for example, or the physical surroundings in which a robot operates. Its learned way of choosing actions is called a policy. These words describe parts of a feedback loop: observe the situation, choose an action, see what happens and adjust future choices.

The important challenge is that consequences may arrive much later. A move that looks unhelpful now might lead to winning the game. The system therefore needs to learn something about sequences of actions, not just immediate rewards. It must also balance trying unfamiliar actions with using approaches that have already worked. This is the exploration–exploitation trade-off: looking for better options versus using known ones.

Reinforcement learning differs from supervised learning, where each training example includes a target answer, such as a photograph paired with the word “cat.” It is particularly relevant when decisions change what happens next. However, learning through trial and error can require many attempts, making simulated environments useful before trying actions in the physical world.

The reward is a human choice, not a complete statement of what matters. Imagine exploring appointment scheduling in a simulated clinic. Rewarding only filled slots could favor short, easy-to-arrange visits while leaving people with more complicated needs waiting. The reward and constraints would need to reflect access, workload and fairness as well as utilization. This is an illustration of the design problem, not a recommendation to learn by experimenting on patients. A good score in the simulation would still need testing against the realities of care delivery.

Sources: OpenAI — Key Concepts in Reinforcement Learning; Sutton and Barto — Reinforcement Learning: An Introduction.

If you would like to find out more about AI and improve your leadership skills, consider the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.


AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.

For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.

Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy