What is RL?

An agent takes actions in an environment to maximize long-run reward — learning from interaction, not a fixed labelled dataset.

Data arrives as a trajectory: state → action → reward → next state → … The objective is high expected cumulative reward (often discounted).

Robot vacuum

States: pose and dirt map. Actions: move / turn / suck. Reward: +1 for dirt cleaned, −0.01 per time step. The vacuum must explore rooms and learn a policy that cleans quickly without getting stuck.

Key takeaways

  • Learn by interacting.
  • Reward is the teaching signal.
  • Optimize long-run return, not only the next step.