v0.22 Release Notes#
This release represents the largest set of changes ever to Gym, and represents a huge step towards the plans for 1.0 outlined here: #2524
Gym now has a new comprehensive documentation site: https://www.gymlibrary.ml/ !
API changes#
Env.reset
now accepts three new arguments:options
: Usable for things like controlling curriculum learning without reinitializing the environment, which can be expensive (@RedTachyon)seed
: Environment seeds can be passed to this reset argument in the future. The old.seed()
method is being deprecated in favor of this, though it will continue to function as before until the 1.0 release for backwards compatibility purposes (@RedTachyon)return_info
: when set toTrue
, reset will return obs, info. This currently defaults toFalse
, but will become the default behavior in Gym 1.0 (@RedTachyon)Environment names no longer require a version during registration and will suggest intelligent similar names (@kir0ul, @JesseFarebro)
Vector environments now support terminal_observation in
info
and support batch action spaces (@vwxyzjn, @tristandeleu)
Environment changes#
The blackjack and frozen lake toy_text environments now have nice graphical rendering using PyGame (@1b15)
Moved robotics environments to gym-robotics package (@seungjaeryanlee, @Rohan138, @vwxyzjn) (per discussion in #2456 (comment))
The bipedal walker and lunar lander environments were consolidated into one class (@andrewtanJS)
Atari environments now use standard seeding API (@JesseFarebro)
Fixed large bug fixes in car_racing box2d environment, bumped version (@carlosluis, @araffin)
Refactored all box2d and classic_control environments to use PyGame instead of Pyglet as issues with pyglet has been one of the most frequent sources of GitHub issues over the life of the gym project (@andrewtanJS)
Other changes#
Removed DiscreteEnv class, built in environments no longer use it (@carlosluis)
Large numbers of type hints added (@ikamensh, @RedTachyon)
Python 3.10 support
Tons of additional code refactoring, cleanup, error message improvements and small bug fixes (@vwxyzjn, @Markus28, @RushivArora, @jjshoots, @XuehaiPan, @Rohan138, @JesseFarebro, @Ericonaldo, @AdilZouitine, @RedTachyon)
All environment files now have dramatically improved readmes at the top (that the documentation website automatically pulls from)
As part of the seeding changes, Gym’s RNG has been modified to use the
np.random.Generator
as the RandomState API has been deprecated. The methodsrandint
,rand
,randn
are replaced byintegers
,random
andstandard_normal
respectively. As a consequence, the random number generator has changed fromMT19937
toPCG64
.
Full Changelog: https://github.com/openai/gym/compare/v0.21.0…0.22.0
Github Release: https://github.com/openai/gym/releases/tag/0.22.0