- Learn the action values of the current policy, here with TD learning.
- Improve the policy by making it -greedy with respect to .
The SARSA update
Temporal Difference (TD) Prediction learns state values. For control the agent needs action values, and the TD(0) update carries over directly: with when is terminal.

Algorithm
Convergence
Tabular SARSA converges with probability 1 to an optimal policy and to if every state-action pair is visited infinitely often, the policy becomes greedy in the limit (GLIE, for example ), and the step sizes satisfy the usual conditions and (Sutton & Barto, 2018). With a fixed , it converges to the best -greedy policy instead. SARSA on the Windy Gridworld runs the algorithm on a task where Monte Carlo control struggles. The Q-learning navigation section puts the SARSA target next to the Q-learning target for a TurtleBot3 that learns to avoid obstacles. Key references: (Sutton & Barto, 2018)References
- Sutton, R., Barto, A. (2018). Reinforcement Learning: An Introduction. Link
Found an error on this page? Report an issue.

