[question] make_atari_env() is not used for Atari environments
See original GitHub issueQuestion
Why does the zoo call standard make_vec_env()
for all environments, including Atari, when sb3 has a special function for it make_atari_env()
?
Train of thought
- train.py calls exp_manager.setup_experiment() to
# Prepare experiment and launch hyperparameter optimization if needed
- which calls self.create_envs()
- which calls make_vec_env() from stable_baselines3
- it calls
make_vec_enc()
, even when the environment is Atari, but could call make_atari_env()
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
'module could not be found' when running gym.make for atari ...
I have 'cmake' and i have installed the gym[atari] dependency. ... enviorment without any issues but cannot run any atari environments.
Read more >Why does the Atari Gym Amidar environment only move after ...
I reviewed some videos of Amidar on YouTube, and it seems that the game screen is fixed for a few seconds before the...
Read more >Atari Environments - endtoend.ai
The OpenAI Gym provides 59 Atari 2600 games as environments. State of the Art. Note: Most papers use 57 Atari 2600 games, and...
Read more >How do I install the Atari environments from openai-gym?
Try using the full path with constructor syntax. Ultimately I would just like this code to work: environment_name = 'Breakout-v0' env = gym.make ......
Read more >Simulating Atari environments | PyTorch 1.x Reinforcement ...
If you are looking to simulate an environment but are not sure of the name you should use in the make() method, you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Miffyli
Sorry for the late reply. Wanted to get as stuck as possible before contacting you. Cheers for the link, both your papers are really interesting. The 2019 one was actually my main reference for a scholarship I have received, so it is quite a coincidence that we met here! And thank you for co-writing it! 😂
Here is a link to my code: https://github.com/rienath/stable-baselines3/tree/gym-to-retro
What I have done
Indeed, Gym Retro allows to get audio and supports Atari games, however, unlike the conventional gym, it does not have different extensions like v4, v0, ram, NoFrameskip, and so on. So That is why I have added the make_retro_env() that will parse the normal gym-like environment names and appropriately wrap the environment to make it work. I promise I will make a proper RetroWrapper and make it neat when I am finished!
I have not used 2 wrappers that are there for standard Gym Atari:
I have managed to achieve a pretty good reward/step ratio with the video-only Retro, but not as good as the default gym, probably because the action space of Retro is significantly larger than the gym. It basically explicitly has all the buttons and some of their combinations as actions instead of having ‘NOOP’, ‘FIRE’ etc. that the normal gym has.
Questions
BreakoutNoFrameskip-v0
aBreakoutDeterministic-v4
by having a frameskip 4 and no repeat_action_probability variable?em.get_audio()
. I will apply FFT, however, before adding it to observations (especially after reading your new paper). However, I am not exactly sure where I should be modifying the observation space as you suggested. Also, I am not sure where to actually add the audio to observations.How to run
If you want to run my code, just insert this into Colab:
and in a separate cell:
This is to add stochasticity to Atari environments. By default they are deterministic, so the agent could learn to do very simple “repeat this sequence of actions” type of things. By starting the environment in slightly different initial states, the agent has to learn to be a touch more dynamic 😃
Nice! This is exactly the type of “simple tests” that you should create to sanity-check new algorithms/implementations 😃. Good thing it works!
No problem, happy to help 😃. I am most active on Discord: my tag is
[my-username-in-github]#0001
. Feel free to add me there!Bit of a nitpick, but I hope you have a personal repository where you store all of this code etc 😃. It would also help others (and show that you have been productive to future job applications) if you put all of this work into a single, public github repo.