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

Agent frozen #145

Closed
satst27 opened this issue Jul 28, 2020 · 8 comments
Closed

Agent frozen #145

satst27 opened this issue Jul 28, 2020 · 8 comments

Comments

@satst27
Copy link

satst27 commented Jul 28, 2020

I'm trying to visualize Breakout and Pong using example_viz_lib and dqn agent. However, in both cases for all 5 checkpoints provided, the agent seems to be stuck in the corner and does not move. In another words agent does not seem to play. The same experiment with SpaceInvaders seems to work fine. Is it because for Breakout and Pong, agent is waiting for FIRE action that never arrives or is it some other reason?

Thanks

@psc-g
Copy link
Collaborator

psc-g commented Jul 28, 2020 via email

@satst27
Copy link
Author

satst27 commented Jul 28, 2020

The agent_visualizer.py as it is provided does not seem to run in colab. With suggested python 2.7, it gives the following error
while installing dopamine-rl
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Is it still supposed to be used with python 2.7? Is there a way around this error? To download Breakout I used the following:
!gsutil -q -m cp -R gs://download-dopamine-rl/lucid/dqn/Breakout/1/tf_ckpt-199.data-00000-of-00001 /tmp
!gsutil -q -m cp -R gs://download-dopamine-rl/lucid/dqn/Breakout/1/tf_ckpt-199.index /tmp
!gsutil -q -m cp -R gs://download-dopamine-rl/lucid/dqn/Breakout/1/tf_ckpt-199.meta /tmp

There seems to be no install error if i set pip install dopamine-rl==1.0.0 but then I see the error
Import: Error: cannot import name example_viz_lib

I therefore tried to run the file locally with Python 3.6, tensorflow=1.15.0 and dopamine installed from source. It is here I see the issue with the agent getting stuck.

thanks,
satst27

@psc-g
Copy link
Collaborator

psc-g commented Jul 28, 2020 via email

@psc-g
Copy link
Collaborator

psc-g commented Jul 29, 2020

we just pushed some fixed and it seems to work from my tests.
can you try it again? you may have to reset your runtime to clear its cache.

@satst27
Copy link
Author

satst27 commented Jul 29, 2020

Thank you very much for upgrading the script! It works very well for SpaceInvaders. However for Breakout, the agent is still frozen. I used the following commands to download the trained breakout agent:

!gsutil -q -m cp -R gs://download-dopamine-rl/lucid/dqn/Breakout/5/tf_ckpt-199.data-00000-of-00001 /tmp
!gsutil -q -m cp -R gs://download-dopamine-rl/lucid/dqn/Breakout/5/tf_ckpt-199.index /tmp
!gsutil -q -m cp -R gs://download-dopamine-rl/lucid/dqn/Breakout/5/tf_ckpt-199.meta /tmp

Can you please help me understand why agent does not seem to play? How do I get trained agent for games like Breakout and Pong? In particulars, have I used the correct download paths above?

Many thanks,
satst27

@psc-g
Copy link
Collaborator

psc-g commented Jul 29, 2020 via email

@satst27
Copy link
Author

satst27 commented Jul 30, 2020

Very helpful. It resolved all my issues.

thanks,
satst27

@satst27 satst27 closed this as completed Jul 30, 2020
@satst27
Copy link
Author

satst27 commented Jul 30, 2020

The issue is resolved.

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

3 participants
@satst27 @psc-g and others