New implementation of the SARSA algorithm