* add pygame GUI for frozen_lake.py env
* add new line at EOF
* pre-commit reformat
* improve graphics
* new images and dynamic window size
* darker tile borders and fix ICC profile
* pre-commit hook
* adjust elf and stool size
* Update frozen_lake.py
* reformat
* fix#2600
* #2600
* add rgb_array support
* reformat
* test render api change on FrozenLake
* add render support for reset on frozenlake
* add clock on pygame render
* new render api for blackjack
* new render api for cliffwalking
* new render api for Env class
* update reset method, lunar and Env
* fix wrapper
* fix reset lunar
* new render api for box2d envs
* new render api for mujoco envs
* fix bug
* new render api for classic control envs
* fix tests
* add render_mode None for CartPole
* new render api for test fake envs
* pre-commit hook
* fix FrozenLake
* fix FrozenLake
* more render_mode to super - frozenlake
* remove kwargs from frozen_lake new
* pre-commit hook
* add deprecated render method
* add backwards compatibility
* fix test
* add _render
* move pygame.init() (avoid pygame dependency on init)
* fix pygame dependencies
* remove collect_render() maintain multi-behaviours .render()
* add type hints
* fix renderer
* don't call .render() with None
* improve docstring
* add single_rgb_array to all envs
* remove None from metadata["render_modes"]
* add type hints to test_env_checkers
* fix lint
* add comments to renderer
* add comments to single_depth_array and single_state_pixels
* reformat
* add deprecation warnings and env.render_mode declaration
* fix lint
* reformat
* fix tests
* add docs
* fix car racing determinism
* remove warning test envs, customizable modes on renderer
* remove commments and add todo for env_checker
* fix car racing
* replace render mode check with assert
* update new mujoco
* reformat
* reformat
* change metaclass definition
* fix tests
* implement mark suggestions (test, docs, sets)
* check_render
Co-authored-by: J K Terry <jkterry0@gmail.com>
* Add support for python 3.6
* Add support for python 3.6
* Added check for python 3.6 to not install mujoco as no version exists
* Fixed the install groups for python 3.6
* Re-added python 3.6 support for gym
* black
* Added support for dataclasses through dataclasses module in setup that backports the module
* Fixed install requirements
* Re-added dummy env spec with dataclasses
* Changed type for compatability for python 3.6
* Added a python 3.6 warning
* Fixed python 3.6 typing issue
* Removed __future__ import annotation for python 3.6 support
* Fixed python 3.6 typing
* Updated docstrings using darglint, ignoring 402 and 202 plus shortened lines into multiple where they were overflowing
* Remove abstract method decorators, for a future PR
* Add __future__ import annotation for python 3.7+ notion
* Added missing bracket
* Fix minor docstring tables
* Added pydocstyle to pre-commit
* Added docstrings for tests and updated the tests for autoreset
* Add pydocstyle exclude folder to allow slowly adding new docstrings
* Add docstrings for setup.py and gym/__init__.py, core.py, error.py and logger.py
* Check that all unwrapped environment are of a particular wrapper type
* Reverted back to import gym.spaces.Space to gym.spaces
* Fixed the __init__.py docstring
* Fixed autoreset autoreset test
* Updated gym __init__.py top docstring
* Remove unnecessary import
* Removed "unused error" and make APIerror deprecated at gym 1.0
* Add pydocstyle description to CONTRIBUTING.md
* Added docstrings section to CONTRIBUTING.md
* Added :meth: and :attr: keywords to docstrings
* Added :meth: and :attr: keywords to docstrings
* Update the step docstring placing the return type in the as a note.
* Updated step return type to include each element
* Update maths notation to reward range
* Fixed infinity maths notation
* Remove additional ignores from flake8
* Remove all unused imports
* Remove all unused imports
* Update flake8 and pyupgrade
* F841, removed unused variables
* E731, removed lambda assignment to variables
* Remove E731, F403, F405, F524
* Remove E722, bare exceptions
* Remove E712, compare variable == True or == False to is True or is False
* Remove E402, module level import not at top of file
* Added --pre-file-ignores
* Add --per-file-ignores removing E741, E302 and E704
* Add E741, do not use variables named ‘l’, ‘O’, or ‘I’ to ignore issues in classic control
* Fixed issues for pytest==6.2
* Remove unnecessary # noqa
* Edit comment with the removal of E302
* Added warnings and declared module, attr for pyright type hinting
* Remove unused import
* Removed flake8 E302
* Updated flake8 from 3.9.2 to 4.0.1
* Remove unused variable
* First version of the new registration
* Almost done
* Hopefully final commit
* Minor fixes
* Missing error
* Type fixes
* Type fixes
* Add some type hinting stuff
* Fix an error?
* Fix literal import
* Add a comment
* Add some docstrings
Remove old tests
* Add some docstrings, rename helper functions
* Rename a function
* Registration check fix
* Consistently use `register` instead of `envs.register` in tests
* Fix the malformed registration error message to not use a write-only format
* Change an error back to a warning when double-registering an environment
* Moved pygame imports into render
* Formatting
* Make pygame optional for box2d, try to make formatting work
* fix tests, fix pre-commit.
* Update ci linter config.
* fix type hints for latest pyright version and backward compatibility with numpy <= 1.21.5
* pre-commit.
Co-authored-by: Ariel Kwiatkowski <ariel.j.kwiatkowski@gmail.com>
Co-authored-by: Gianluca De Cola <gianluca.decola@ags-it.com>
* Update pendulum.py
* version warnings
* black
* try except
* update notices version
* Exception
* nosec
* black
* no loop, stderr
* black
* convert ## to ###
* correct subheader
* black
* despace
* spacing
* frozen lake fixes
* rename render modes/fps
* fix API test
* fix API test
* fix more API tests
* black
* add render fps
* Fix `return_info` for Observation wrappers, Atari (?) and framestack
* Make type checkers and IDEs happier
* Merge in #2454
* Update the info dict based on no-op steps
Some type hints
* Bug fix
* Handle resets during frameskip
* Typecheck classic control environments
* consistent imports + comments
* Don't use seed method
Although this code is exact duplication, we at least don't call deprecated method.
* Update core.py
* initial draft of optional info dict in reset function, implemented for cartpole, tests seem to be passing
* merged core.py
* updated return type annotation for reset function in core.py
* optional metadata with return_info from reset added for all first party environments, with corresponding tests. Incomplete implementation for wrappers and vector wrappers
* removed Optional type for return_info arguments
* added tests for return_info to normalize wrapper and sync_vector_env
* autoformatted using black
* added optional reset metadata tests to several wrappers
* added return_info capability to async_vector_env.py and test to verify functionality
* added optional return_info test for record_video.py
* removed tests for mujoco environments
* autoformatted
* improved test coverage for optional reset return_info
* re-removed unit test envs accidentally reintroduced in merge
* removed unnecessary import
* changes based on code-review
* small fix to core wrapper typing and autoformatted record_epsisode_stats
* small change to pass flake8 style
* First find/replace, now tests
* Fixes to the vector env
* Make seed keyword only in wrappers
* (try to) fix the bug with old environments using new wrappers (with the seed keyword)
* black
* Change **kwargs to options, try to make it work; black
* Add OrderEnforcing wrapper to wrapper exports
Add a test for compatibility with old (pybullet-like) envs
* Add OrderEnforcing wrapper to wrapper exports
Add a test for compatibility with old (pybullet-like) envs
black
* Update the env checker
* Update the env checker
* Update the env checker to use inspect (might fail tests, let's see)
* Allow the signature to include kwargs in env_checker
* Minor fix
* Typing in gym/envs/registration.py
* Add registration to type checked list
* Adds type hints to space.py
* Typing in gym.core.Env
* Typing in seeding.py
* fixup Typing after rebase
* revert accidental change
* Install dependencies in pyright runner
* fix: can only install dependencies after checkout
* fix: install types in a venv
* fix path
* skip env activation, install directly from venv interpreter
* absolute path to venv
* use central python installation
* skip one more typecheck
* cleanup gh actions .yml
* Add py.typed to signal using sources for typechecking
* black!
Co-authored-by: sj_petterson <sj_petterson@gmail.com>
Co-authored-by: J K Terry <justinkterry@gmail.com>
* Ditch most of the seeding.py and replace np_random with the numpy default_rng. Let's see if tests pass
* Updated a bunch of RNG calls from the RandomState API to Generator API
* black; didn't expect that, did ya?
* Undo a typo
* blaaack
* More typo fixes
* Fixed setting/getting state in multidiscrete spaces
* Fix typo, fix a test to work with the new sampling
* Correctly (?) pass the randomly generated seed if np_random is called with None as seed
* Convert the Discrete sample to a python int (as opposed to np.int64)
* Remove some redundant imports
* First version of the compatibility layer for old-style RNG. Mainly to trigger tests.
* Removed redundant f-strings
* Style fixes, removing unused imports
* Try to make tests pass by removing atari from the dockerfile
* Try to make tests pass by removing atari from the setup
* Try to make tests pass by removing atari from the setup
* Try to make tests pass by removing atari from the setup
* First attempt at deprecating `env.seed` and supporting `env.reset(seed=seed)` instead. Tests should hopefully pass but throw up a million warnings.
* black; didn't expect that, didya?
* Rename the reset parameter in VecEnvs back to `seed`
* Updated tests to use the new seeding method
* Removed a bunch of old `seed` calls.
Fixed a bug in AsyncVectorEnv
* Stop Discrete envs from doing part of the setup (and using the randomness) in init (as opposed to reset)
* Add explicit seed to wrappers reset
* Remove an accidental return
* Re-add some legacy functions with a warning.
* Use deprecation instead of regular warnings for the newly deprecated methods/functions
The current docstring for `reset()` seems to indicate that the
environment will be identical after separate calls to `reset()`.
However, the `reset()` function isn't supposed to reset the states of
the environment's RNGs [1]. This change clarifies the relationship
between the `reset()` function and the RNGs.
[1]: https://github.com/openai/gym/issues/250
* add type of argument
* fix typos
* split lines for formatting
* reformat string, add ellipsis, remove r string
* make docstring stylistically consistent
* make docstrings a little more elaboratet
* reduce by 1 space
* make line wrap 120
* remove unnecessary line
* add returns to docstring
* add docstring, make code more pep8 and delete some unused print functions
* more pep8
* file docstring instead of comments
* delete unused variables, add file docstring and add some pep8 spring cleaning
* add file docstring, fix typos and add some pep8 correections
Co-authored-by: Dan <daniel.timbrell@ing.com>
* Implement PixelObservationWrapper
* Change MujocoEnv.render to support custom camera_{name,id}
* Implement tests for PixelObservationWrapper
* Use env.get_pixels instead of direct env.render
* Fix camera_{id,name} check in pixel observation wrapper
* Fix rendering with explicit camera_id
* Add Wrapperget_pixels to allow call to be propagated to wrapped env
* Remove use of unnecessary `get_pixels` method
* Update PixelObservationWrapper to support multiple pixel keys
* Remove unnecessary `rgb_rendering_tracking` argument
* Remove rgb_rendering_tracking logic
Binding `__contains__` to the Space class' contains method this way prevents overriding it in subclasses, which leads to `NotImplementedException`s when trying to do things like `2 in gym.spaces.Discrete(2)`.