Reinforcement learning

SARSA

SARSA updates an action-value estimate using the next action actually chosen by the behavior policy. It is an on-policy TD control method.

Ask the Reinforcement learning assistant 1 min read · Updated September 9, 2026

Definition

SARSA updates an action-value estimate using the next action actually chosen by the behavior policy. It is an on-policy TD control method.

Intuition

Because the target includes exploratory actions, the learner accounts for the risks of its own exploration.

Worked example

In a cliff-walking task, exploratory moves near the edge can make SARSA prefer a safer route during training.

The math

Q(s,a)←Q(s,a)+α[r+γQ(s′,a′)−Q(s,a)]Q(s,a)\leftarrow Q(s,a)+\alpha[r+\gamma Q(s^{\prime},a^{\prime})-Q(s,a)], where a′a^{\prime} is sampled from the behavior policy.

In practice

Compare SARSA and Q-learning under the same exploration schedule to separate behavior-policy effects from implementation differences.

Go deeper

Sources

More in Reinforcement learning

Assembled from the ReLU.chat curated knowledge base. These explanations are concise on purpose; check the sources for anything important.