PacktPublishing / Deep-Reinforcement-Learning-Hands-On

Hands-on Deep Reinforcement Learning, published by Packt
MIT License
2.83k stars 1.28k forks source link

Chapter 6: dqn_pong Confusing statement #18

Closed gowtham1997 closed 5 years ago

gowtham1997 commented 5 years ago

This is regarding line 77(new_state = new_state) in dqn_pong.

    new_state, reward, is_done, _ = self.env.step(action)

    self.total_reward += reward

    new_state = new_state

was this supposed to be self.state = new_state (which is done in line 81)?

icompute386 commented 5 years ago

was this the solution?

Shmuma commented 5 years ago

was this supposed to be self.state = new_state (which is done in line 81)?

No, this line need to be removed (already done in master branch). This place is too early to do assignment, as we still need old state