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 withspace.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
andnumpy
withJaxToTorch
,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
andNumpyToTorch
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
andVectorWrapper
error checking by @pseudo-rnd-thoughts (#1260)
Bug Fixes
- Fix
get_wrapper_attr
/set_wrapper_attr
for edge case by @duburcqa (#1293) - Add width and height check for MujocoRenderer to help error checking by @Beanpow (#1230)
- Fix CarRacing-v3 with discrete actions by @Sebastian-Griesbach (#1253)
- Fix Mujoco Rendering for
rgb_array
that is upside down by @pseudo-rnd-thoughts (#1264) - Revert
OrderedDict
key ordering inDict
space by @pseudo-rnd-thoughts (#1291) wrappers.vector.NumpyToTorch
doesn't requirejax
to work by @pseudo-rnd-thoughts (#1308)- Prevented accidental alteration of
env_spec_kwargs
inmake_vec
by @TimSchneider42 (#1304) - Quit Pygame when cliffwalking environment is closed by @sjmikler (#1297)
- Add
TimeAwareObservation
support for environments without aspec
by @pseudo-rnd-thoughts (#1289) - Improve the error message when ending the MuJoCo renderer without calling
env.close
by @a-ayesh (#1283)
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