Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some problems in the DQN example #117

Open
opocaj92 opened this issue Oct 28, 2017 · 0 comments
Open

Some problems in the DQN example #117

opocaj92 opened this issue Oct 28, 2017 · 0 comments

Comments

@opocaj92
Copy link

opocaj92 commented Oct 28, 2017

Hi everyone,
First of all, thank you a lot, these exercises are being very useful for me to fix in mind what I've read on David Silver's slides.
I'm trying the DQN example, and I've found some errors. I'm referring to the dqn.py file in the repository for the line numbers:

  1. Some attruibute in the TF summary creation (and also some other points somewhere else in the code) are wrong in the "skeleton" file, but are correct in the solution.
    These are:
    line 31: the size of the resized image should be [84, 84] (a list) and not 84, 84 (two separate attributes)
    line 62: tf.train.SummaryWriter should be tf.summary.FileWriter
    lines 106-110: tf.merge_summary should be tf.summary.merge, same for tf.scalar_summary and tf.histogram_summary with tf.summary.scalar and tf.summary.histogram respectively
    line 149: you use a class to copy the parameters between the two models in the solution, but a method in the skeleton (that's not important however, it works anyway)
    line 295: env.monitor.start() should be env=gym.wrappers.Monitor() (in the solution you use from gym.wrappers import Monitor at the beginning and then just env=Monitor(), that is the same). Also, line 381 should be removed (it is the call to env.monitor.close()).
  2. line 377: the use of yield cause an error with the return statement "return with argument inside generator". This error is still there also in the solution, at least for me. If you comment the yield block, it works fine (but you're not getting the results, it just compute the solution).
  3. Also, you should change the call to tf.initialize_all_variables() at line 401 (there is also another one somewhere in the skeleton file where you test if everything is setted up correctly) with tf.global_variables_initializer() (the method tf.initialize_all_variables() is deprecated and is going to be removed soon from the TF library).
    Hope it helps, thanks again for these fantastic exercises!
praveen-palanisamy added a commit to praveen-palanisamy/reinforcement-learning that referenced this issue Nov 1, 2017
praveen-palanisamy added a commit to praveen-palanisamy/reinforcement-learning that referenced this issue Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant