RL Fundamentals: Agent, Environment, State, Action, Reward, Policy, Value

~13 min read

The core vocabulary of reinforcement learning, explained through a simple dog-training analogy — agent, environment, state, action, reward, policy, and value function.

RL Fundamentals: Agent, Environment, State, Action, Reward, Policy, Value is a Pro topic

Sign in, then upgrade to Pro or Power to unlock this topic and the full AI Engineering curriculum.

Key points

  • Agent (the learner), environment (everything it interacts with), state (current observable situation) — the basic setting RL operates in
  • Action (what the agent can do) and reward (a number scoring how good that action's outcome was) — the basic feedback loop
  • Policy: the agent's learned strategy, mapping states to actions — this is the actual thing training changes, not hand-coded rules
  • Value function: an estimate of expected LONG-TERM reward from a state, distinct from immediate reward — sometimes the best action isn't the one with the biggest instant payoff
  • This exact vocabulary is formalized into a software interface by OpenEnv (rl-environments-for-agents topic) and applied to LLM training by RFT/GRPO (sft-vs-rft topic)