higgsfield / RL-Adventure

Pytorch Implementation of DQN / DDQN / Prioritized replay/ noisy networks/ distributional values/ Rainbow/ hierarchical RL
2.99k stars 587 forks source link

The update in DQN #31

Closed YuxuanXie closed 4 years ago

YuxuanXie commented 4 years ago

Hi,

I get a question about your implementation of DQN, which is supposed to have a C-interval-update between target q-network and current q-network. I see this update in your implementation of DDQN. Can you please tell me why it is this way?

In my point of view, your implementation of ddqn is actually dqn.


Best, Yuxuan

douglasrizzo commented 3 years ago

I realized that too. In fact, there is no target network at all in 1.dqn.ipynb.

The following line in the notebook (cell 19):

next_q_values = model(next_state)

Should be:

next_q_values = target_model(next_state)
YuxuanXie commented 3 years ago

Yes, you are right. thanks!