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

Fix space utils for Discrete with non-zero start #2645

Merged
merged 4 commits into from
Mar 4, 2022

Conversation

tristandeleu
Copy link
Contributor

  • Fix flatten and unflatten functions for a Discrete space by adding an offset.
  • Fix batch_space to return a Box space when batching a Discrete space with non-zero start (and still return a MultiDiscrete otherwise).
  • Break down the singledispatch for the function batch_space, and use the conventions from gym.spaces.utils.

Fixes #2644

Copy link

@lebrice lebrice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@RedTachyon
Copy link
Contributor

Seems good overall, tests are passing, everything makes sense

@jkterry1 jkterry1 merged commit e671aa1 into openai:master Mar 4, 2022
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

Successfully merging this pull request may close these issues.

[Bug Report] Space utils break for Discrete with non-zero start
4 participants