openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.57k stars 8.59k forks source link

Thread-safe initialization of ALE #281

Closed ppwwyyxx closed 4 years ago

ppwwyyxx commented 8 years ago

ALE environment initialization is not thread safe https://github.com/mgbellemare/Arcade-Learning-Environment/issues/86 . And I've observed the same kind of error in gym.

In my own wrapper I used a threading.Lock around all ALE initialization: atari.py#L62 to avoid the bug. I think a similar solution can be built into gym as well.

I can submit a PR if you're OK with this solution.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.