Answers.Body: <p>As you said yourself, it is a hyperparameter. Hence, no one (even you) can say what is the ideal update frequency. You have to test and try.</p>
  <p>Having said that, remember one thing the target NN should mimic the actual network as closely as possible. Hence if you update it after a long number runs, then I think you will start losing the accuracy. On the contrary, if you update it too often, then you lose the benefit of using the target network (which is to boost the training rate and reduce training time) and the training will take a larger amount of time.</p>
  <p>My suggestion is to try updating after every 5 to 8 episodes.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-18T08:05:56.707Z
Answers.LastActivityDate: 2020-08-18T08:05:56.707Z
Answers.UserDisplayName: SJa
Body: <p>I have been dealing with a problem that I'm trying to solve with DQN. A general question that I have is regarding the target's update frequency. How should it change? Depending on what factor do we increase or decrease this hyperparameter?</p>
  
Tags: <reinforcement-learning><deep-learning><dqn><hyperparameter-optimization><hyper-parameters>
Title: How should I choose the target's update frequency in DQN?
UserDisplayName: Hossein Ostovar
ThreadText: # How should I choose the target's update frequency in DQN?
  
  (Asked by: username_0 on 2020-08-17)
  
  I have been dealing with a problem that I'm trying to solve with DQN. A general question that I have is regarding the target's update frequency. How should it change? Depending on what factor do we increase or decrease this hyperparameter?
  
  **Tags:** reinforcement-learning, deep-learning, dqn, hyperparameter-optimization, hyper-parameters
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-18. Score: 1
  
  As you said yourself, it is a hyperparameter. Hence, no one (even you) can say what is the ideal update frequency. You have to test and try.
  
  Having said that, remember one thing the target NN should mimic the actual network as closely as possible. Hence if you update it after a long number runs, then I think you will start losing the accuracy. On the contrary, if you update it too often, then you lose the benefit of using the target network (which is to boost the training rate and reduce training time) and the training will take a larger amount of time.
  
  My suggestion is to try updating after every 5 to 8 episodes.
  
  
  ---
  
  