---
title: "Reinforcement learning"
url: https://www.daytona.com/compute-glossary/reinforcement-learning
---

# Reinforcement learning

Part of the [Compute Glossary](https://www.daytona.com/compute-glossary.md).

Reinforcement learning trains a model by letting it try a task and scoring the result, instead of showing it the right answer. A model that acts as an agent learns this way by working in an environment, often a sandbox with a repository, a browser or a shell. Each attempt ends with a reward, a score for how well the task went. Over many attempts the model shifts toward the actions that earned higher rewards.

Training needs a very large number of attempts, so the environments run in parallel, often thousands at once. An agent that runs code needs an isolated machine for each attempt, started fresh or reset to a known state before the next one. A verifier then scores the result, often by running tests inside the same sandbox. Starting, resetting and scheduling these machines decides how fast training can go.

The model trains on GPUs, while the environments mostly run on ordinary processors in sandboxes. The two sides have to keep pace, or one waits for the other. Isolation matters here as well, because a model rewarded for passing tests may learn to cheat instead of solving the task. Keeping tests and the verifier's code out of reach, and limiting the network, closes some of the ways to cheat.

## Terms

- [Reinforcement learning](https://www.daytona.com/compute-glossary/reinforcement-learning/reinforcement-learning.md): Reinforcement learning is a way of training a model by letting it act, scoring the outcome, and favoring the actions that scored well.
- [Environment](https://www.daytona.com/compute-glossary/reinforcement-learning/environment.md): An environment is the world a model acts in during reinforcement learning, which responds to each action with a new state.
- [Rollout](https://www.daytona.com/compute-glossary/reinforcement-learning/rollout.md): A rollout is one run of a model through a task in an environment, recorded so that training can learn from it.
- [Verifier](https://www.daytona.com/compute-glossary/reinforcement-learning/verifier.md): A verifier is a program that checks the result of a rollout and turns it into a reward.
- [Reward hacking](https://www.daytona.com/compute-glossary/reinforcement-learning/reward-hacking.md): Reward hacking is when a model learns to earn a high reward without doing the task that the reward was meant to measure.
- [Actor–learner architecture](https://www.daytona.com/compute-glossary/reinforcement-learning/actor-learner-architecture.md): An actor–learner architecture is a design for reinforcement learning that separates the workers who run rollouts from the process that updates the model.
