github Farama-Foundation/Gymnasium v1.1.0

15 hours ago

Gymnasium v1.1

In this release, we fix several bugs with Gymnasium v1.0 along with new features to improve the changes made.

With the release of Gymnasium v1.0, one of the major changes we made was to the vector environment implementation, improving how users interface with it and extend it. Some users noted that they required backward compatibility with how vector environments automatically reset sub-environments when they terminated or truncated, referred to as the autoreset mode or API. As a result, in v1.1, we have added support to the implemented vector environments (SyncVectorEnv and AsyncVectorEnv) and wrappers for all three possible modes: next-step, same-step and disabled. To know the type of autoreset mode used, it should be specified in the vector environment metadata, metadata["autoreset_mode"] as a gymnasium.vectors.AutoresetMode enum. For more information on the differences between the autoreset modes and how to use them, read https://farama.org/Vector-Autoreset-Mode.

In addition, we've added several helpful features

  • In Gymnasium v0.25, we added masking for spaces, space.sample(mask=...), to logically mask out possible samples from spaces. #1310 adds probability masking for each space with space.sample(probability=...) to specify the probability of each sample, which is helpful for RL policies that output a probability distribution of actions.
  • For MuJoCo environments, users have the option to render the robot with RGB images or depth-based images. Previously, it was only possible to access only the RGB or depth rendering. Gymnasium v1.1 adds RGBD rendering that outputs both the RGB and depth-based image as a single output.
  • In Gymnasium v1.0, we improve the conversion wrappers between jax, torch and numpy with JaxToTorch, JaxToNumpy, NumpyToTorch, etc. In v1.1, we've improved the wrappers to work with rendering and to be compatible with the full dlpack API.

New Features

  • Space sampling with probability masks by @mariojerez (#1310)
  • Add rgb + depth rendering to mujoco by @DavidPL1 (#1229)
  • Add Render Support for JaxToNumpy, JaxToTorch and NumpyToTorch by @amacati (#1306)
  • Add full support for dlpack API by @amacati (#1299)
  • Enable the StickyAction wrapper to repeat the old action for more than 1 step by @sparisi (#1240)
  • Add wrappers.vector.TransformObs/Action support for a single obs/action space argument by @howardh (#1288)
  • Improve 'set_wrapper_attr' for wrappers to modify how variables are updated by @duburcqa (#1294)
  • Allow AtariPreprocessing to support non-square observations by @li-plus (#1312)
  • Improve Wrapper and VectorWrapper error checking by @pseudo-rnd-thoughts (#1260)

Bug Fixes

Documentation Changes

  • Fixed typo in blackjack for the values sampled, 2-10 instead of 2-9 by @artemmiyy (#1250)
  • Added some popular third-party beginner tutorials by @godsboy404 (#1271)
  • Update documentation for reward scaling wrappers by @keraJLi (#1285)

Thanks to the 31 new contributors that contributed to this release with the Full Changelog: v1.0.0...v1.1.0

Don't miss a new Gymnasium release

NewReleases is sending notifications on new releases.