What Is the Difference Between On-Policy and Off-Policy Learning?
On policy learning updates a policy using experience associated with that policy. Off policy learning can learn about a target policy using actions collected by a different behavior policy.
The key idea
On policy learning updates a policy using experience associated with that policy. Off policy learning can learn about a target policy using actions collected by a different behavior policy.
PPO typically collects fresh robot rollouts, performs several optimization passes, then collects new data. SAC can sample older transitions from a replay buffer while improving its current policy.
Off policy does not mean every old dataset is useful. Coverage, distribution differences, and the algorithm’s correction methods still matter. Reusing data can improve efficiency, but unsupported actions and inaccurate estimates can undermine learning.
What to remember
- The distinction concerns data and target policies
- PPO refreshes rollouts. SAC uses replay
- Data reuse requires suitable coverage
Check your understanding
Why can off-policy learning reuse data from another behavior policy?
Show the explanation
Its target policy can differ from the policy that collected the actions. Useful reuse still depends on dataset coverage, distribution differences and the algorithm's correction assumptions.