In reinforcement learning, what are the agent, environment, state, action, reward and policy, and how do they interact in one step of the loop?

Reinforcement learning, Basic setting
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you can name the parts of the reinforcement learning loop and say which one produces which signal.

Key idea

At each time step the agent sees a state st, picks an action at using its policy π(a∣s), and the environment replies with a reward rt+1 and a new state st+1. The agent's goal is to choose actions that maximise the total future reward.

Steps

  1. Define the agent, environment and state: the agent is the learner or decision-maker, the environment is everything outside it that reacts to its actions (such as a game or robot surroundings), and the state st is what the agent observes at time t (such as the board position).
  2. Define the policy π as the agent's rule for choosing actions. It can be deterministic, a=π(s), or random, π(a∣s).
  3. Describe one step: the agent picks an action at using its policy, then the environment replies with a number called the reward rt+1 (how good the outcome was) and the next state st+1.
  4. State the goal. The agent does not just chase the next reward; it tries to collect as much total reward as possible over time. Later rewards are usually counted a little less, using a discount factor γ between 0 and 1.
  5. Give a one-line example: in chess the state is the board, an action is a legal move, the reward is +1 for a win and 0 otherwise, and the policy is the player's strategy.

Common mistakes

How long your answer should be

4–6 sentences, plus one example.

Read this

Previous in Reinforcement learning: none
Next in Reinforcement learning: What is the exploration–exploitation dilemma, and why can a purely greedy agent get stuck choosing a poor action?