Dictionary of Applied Machine Learning: 114 machine-learning terms, each with a definition, a figure, citations and a Python demo · All terms · Demos · Start here

reward

Updated on 2026-10-28

Readiness 100/100

▶ Run the Python demo Open in Colab Typeset PDF LaTeX source Markdown Cite this entry

See also loss reinforcement learning label

A reward is an observed quantity that allows a machine learning (ML) 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 ML 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 (RL) 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.

Figure produced by the Python demo of the entry reward
Figure written by the entry's Python demo reward.py, which recomputes what the entry states: the script block by block · open in Colab

Definition

B-partialThe ultimate goal of machine learning (ML) 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 ML 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
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 $\timeidx$ that prediction is $\localhypothesis{\timeidx}\big(\featurevec^{(\timeidx)}\big)$. The red arrow is the label $\truelabel^{(\timeidx+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 $\timeidx$ and $\timeidx+1$ the predicted direction keeps the car on its lane, while at $\timeidx+2$ it carries the car over the outer contour and earns a low reward
A reward is an observed quantity from which an ML 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 ML 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.

B-learnA 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 (RL) 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
Figure 2: The working principle of RL. At each time step $\timeidx$ the state $\state_{\timeidx}$ is observed, an action $\arm_{\timeidx}$ is chosen, and a reward $\reward_{\timeidx+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, multiarmed bandit, reinforcement learning, return, action, label.

References

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

Cite this entry

@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}
}