What is the difference between Q-learning and SARSA?

When I was learning this part, I found it very confusing too, so I put together the two pseudo-codes from R.Sutton and A.G.Barto hoping to make the difference clearer. Blue boxes highlight the part where the two algorithms actually differ. Numbers highlight the more detailed difference to be explained later. TL;NR: | | SARSA | … Read more

tech