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 , picks an action using its policy , and the environment replies with a reward and a new state . The agent's goal is to choose actions that maximise the total future reward.
Steps
- 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 is what the agent observes at time (such as the board position).
- Define the policy as the agent's rule for choosing actions. It can be deterministic, , or random, .
- Describe one step: the agent picks an action using its policy, then the environment replies with a number called the reward (how good the outcome was) and the next state .
- 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.
- Give a one-line example: in chess the state is the board, an action is a legal move, the reward is for a win and otherwise, and the policy is the player's strategy.
Common mistakes
- Treating the reward as a label that says which action was correct. It only says how good the outcome was, and it may arrive many steps later.
- Forgetting that the next state depends on the action, so the agent's choices change the data it sees.
- Confusing the reward (immediate signal) with the return (total discounted future reward).
How long your answer should be
4–6 sentences, plus one example.
Read this
- Sutton and Barto, Reinforcement learning: an introduction (2nd edition): Section 3.1, The agent–environment interface (page 47), defines state, action, reward and the loop, and Section 3.2 explains why reward encodes the goal.
- NPTEL: Reinforcement Learning (IIT Madras, Prof. Balaraman Ravindran): Week 1, Introduction to RL and RL Framework and Applications, which define the agent, environment, state, action and reward.
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?