# reward

*Entry of the [Dictionary of Applied Machine Learning](https://dictionaryofml.org) (course edition), by Alexander Jung, Aalto University. CC BY 4.0. Updated 2026-10-28. [HTML](https://dictionaryofml.org/terms/reward.html) · [typeset PDF](https://dictionaryofml.org/terms/reward.pdf) · [LaTeX](https://dictionaryofml.org/terms/reward.tex) · [Python demo](https://dictionaryofml.org/terms/reward.py) · [notebook](https://dictionaryofml.org/terms/reward.ipynb)*

Math is LaTeX with the book's macros expanded, so no notation package is needed to read it.

## Abstract

A reward is an observed quantity that allows a machine learning method to estimate the loss incurred by the prediction of a hypothesis. One example of such a quantity is the label of a data point itself. Many machine learning applications, however, do not allow the label to be observed, but only a noisy estimate of it; some allow only the prediction error of one specific prediction to be observed. Reinforcement learning methods learn a sequence of hypothesis maps from the rewards obtained by their predictions. For example, a self-driving vehicle predicts, at each time instant, a steering direction, and observes as a reward whether that direction keeps the vehicle on its lane, with a low reward for a direction that carries it off the road.

## Definition

The ultimate goal of machine learning is to learn a hypothesis that predicts the label of a data point well from its features. Choosing among different hypothesis maps requires a measure of the prediction error that a hypothesis incurs. Such a measure is the loss, which can be defined, for example, by comparing the prediction $h({\mathbf x})$ with the actual label value $y$. In some machine learning applications, however, the label of a data point cannot be accessed at all. Consider a self-driving car, where a data point is the current time instant and the label is the optimal steering direction. That optimal direction is never observed; what is observed is whether the steering direction predicted by the hypothesis keeps the car on its lane (Fig. 1).

![Figure 1 of the entry reward](https://dictionaryofml.org/terms/fig/reward-fig1.svg)

*Figure 1: A self-driving car at three time instants, between the two contours of the road. At each instant the hypothesis predicts a steering direction (black arrows); at time instant $t$ that prediction is $h^{(t)}\big({\mathbf x}^{(t)}\big)$. The red arrow is the label $y^{(t+2)}$, the optimal steering direction, which follows the lane. That label is rarely accessible: obtaining it would require a driving instructor to analyze every possible driving scenario. What is observed instead is a reward: at $t$ and $t+1$ the predicted direction keeps the car on its lane, while at $t+2$ it carries the car over the outer contour and earns a low reward*

A reward is an observed quantity from which a machine learning method estimates the loss incurred by the prediction of a hypothesis. One example of such a quantity is the label of a data point itself. Many machine learning applications, however, do not allow the label to be observed, but only a noisy estimate of it. Some allow only the prediction error of one specific prediction to be observed. The self-driving car of Fig. 1 is of the last kind: the reward is whether the steering direction $h({\mathbf x})$ predicted at a time instant keeps the car on its lane, and a low reward is assigned to a direction that carries the car over a contour of the road.

A reward replaces the label of supervised learning: it does not reveal the correct prediction, only how good the chosen prediction, the action, was, and it may arrive delayed, several time steps after the action that caused it, or corrupted by noise (Sutton and Barto, 2018, Sect. 1.1). Reinforcement learning methods learn a sequence of hypothesis maps from the rewards obtained by their predictions: the negative reward is the loss of the action taken, and the actions chosen are those that maximize the cumulative reward, the return (Sutton and Barto, 2018, Sect. 3.2). In the self-driving car of Fig. 1, the state $s_{t}$ is the position and orientation of the car on the road at time instant $t$, and the action $a_{t}$ is the steering direction predicted there. Fig. 2 shows how states, actions and rewards follow one another over two time steps.

![Figure 2 of the entry reward](https://dictionaryofml.org/terms/fig/reward-fig2.svg)

*Figure 2: The working principle of reinforcement learning. At each time step $t$ the state $s_{t}$ is observed, an action $a_{t}$ is chosen, and a reward $r_{t+1}$ is received (solid arrows). The reward scores the chosen action without revealing which action would have been best, and an action can also affect a later reward (dashed arrow), which is why the return, the cumulative reward, rather than the next reward alone is maximized*

**See also:** [loss](https://dictionaryofml.org/terms/loss.html), multiarmed bandit, [reinforcement learning](https://dictionaryofml.org/terms/reinforcementlearning.html), return, action, [label](https://dictionaryofml.org/terms/label.html).

## References

- Sutton and Barto (2018). Reinforcement Learning: An Introduction. *MIT Press*.

## Cite this entry

```bibtex
@misc{dictml_reward,
  author = {Jung, Alexander},
  editor = {Olioumtsevits, Konstantina and Schnoor, Ekkehard},
  title = {reward},
  howpublished = {Dictionary of Applied Machine Learning (course edition)},
  year = {2026},
  doi = {10.5281/zenodo.21569296},
  note = {ISBN 978-952-64-3013-3, CC BY 4.0, retrieved 2026-11-03},
  url = {https://dictionaryofml.org/terms/reward.html}
}
```
