Youtube-Code-Repository icon indicating copy to clipboard operation
Youtube-Code-Repository copied to clipboard

improve dueling_dqn_keras loop

Open Infinity0106 opened this issue 4 years ago • 0 comments

Before hand, Thanks you for all the knowledge that you have shared, if it was not for your videos I could not understand Q Learning.

https://github.com/philtabor/Youtube-Code-Repository/blob/3fd7b0248e3e81a75d889a80ed2bf7f710334b12/ReinforcementLearning/DeepQLearning/dueling_dqn_keras.py#L120

I tested with my code and apparently they do the same

q_next = np.squeeze(q_next)
q_next[dones] = 0.0
q_tmporal = rewards + self.gamma*q_next
q_target[np.arange(self.batch_size),actions] = q_tmporal

Infinity0106 avatar Apr 21 '20 14:04 Infinity0106