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

Support for other gym versions #10

Open
rademacher-p opened this issue Nov 8, 2022 · 2 comments
Open

Support for other gym versions #10

rademacher-p opened this issue Nov 8, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@rademacher-p
Copy link

This package requires gym==0.23.1, influencing which third-party RL libraries are compatible.

Is there potential support for the latest gym version v0.26, or even better, the new gymnasium package that is replacing Gym?

Also, the gym API for v0.23 is not too dissimilar from the v0.21 API. Can this be supported? Pre-v0.22 gym is still commonplace and is required for the popular Stable Baselines 3.

Thanks for the info!

@maxstanden maxstanden added the enhancement New feature or request label Nov 9, 2022
@maxstanden
Copy link
Collaborator

That versioning requirement is for np_random imported from gym.utils.seeding and the use of its randint function. If there is a version of this function that supports more libraries then we would be happy to change to it.

@rademacher-p
Copy link
Author

rademacher-p commented Nov 10, 2022

As far as I can tell, the only difference in seeding behavior between the latest version of gymnasium and gym==0.23.1 is the definition of seeding.RandomNumberGenerator. Note that the source code for the latter marks that their RNG is deprecated in favor of the newer NumPy Generator objects.

Similarly, a variety of methods, randint included, are deprecated. In v0.23.1, these methods were simply wrapping the new Generator methods; the source code indicates the proper replacements for the modern API.

If the problem is that other CybORG code is accessing env.np_random.randint, these instances could most likely be replaced with env.np_random.integers without raising any errors. I'm just onboarding with CybORG, but would be happy to help with a PR 😃

Note that there would be other considerations before gymnasium would be compatible, specifically the updates to the environment step and reset API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants