def return_expected_action(p, u, T, v):
actions_array = np.zeros(4)
for action in range(4):
#Expected utility of doing a in state s, according to T and u.
actions_array[action] = np.sum(np.multiply(u, np.dot(v, T[:,:,action])))
return np.argmax(actions_array)
https://mpatacchiola.github.io/blog/2016/12/09/dissecting-reinforcement-learning.html
should be (from sources):
also we don't need a parameter
p