A theoretical and empirical analysis of expected sarsa