reinforcement-learning icon indicating copy to clipboard operation
reinforcement-learning copied to clipboard

Wrong max of next state action?

Open NMO13 opened this issue 10 months ago • 0 comments

In QAgent train(), there is

self.Q[s,a] = self.Q[s,a] + self.lr * (r + self.gamma*np.max(self.Q[s_next,a]) - self.Q[s,a])

but should be imho

self.Q[s,a] = self.Q[s,a] + self.lr * (r + self.gamma*np.max(self.Q[s_next,:]) - self.Q[s,a])

NMO13 avatar Apr 09 '24 17:04 NMO13