AI engineering glossary · Reinforcement learning

What is SARSA?

SARSA: An on-policy temporal-difference control method that updates action values using the quintuple state, action, reward, next state, next action. Formula: Q(s,a) = Q(s,a) + alpha*[r + gamma*Q(s',a') - Q(s,a)], where a' is the choice actually made next, including exploratory ones.

Level: advancedTopic: Reinforcement learning

SARSA: an example

In a cliff-walking grid, SARSA learns a safer path away from the edge because it accounts for its own random slips.

Related terms

More Reinforcement learning terms

Where you learn it

SARSA is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.