* 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
* Fix examples in docstrings
* Add docstrings and type hints where known to all functions and classes in gym/utils and gym/vector
* 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
* Imported annotations from __future__ to fix python 3.7
* Add __future__ import annotations for python 3.7
* isort
* Remove utils and vectors for this PR and spaces for previous PR
* Update gym/envs/classic_control/acrobot.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/envs/classic_control/acrobot.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/envs/classic_control/acrobot.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/spaces/dict.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/utils/env_checker.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/utils/env_checker.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/utils/env_checker.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/utils/env_checker.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/utils/env_checker.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/utils/ezpickle.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/utils/ezpickle.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Update gym/utils/play.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Pre-commit
* Updated docstrings with :meth:
* Updated docstrings with :meth:
* Update gym/utils/play.py
* Update gym/utils/play.py
* Update gym/utils/play.py
* Apply suggestions from code review
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* pre-commit
* Update gym/utils/play.py
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Updated fps and zoom parameter docstring
* Update play docstring
* Apply suggestions from code review
Added suggested corrections from @markus28
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Pre-commit magic
* Update the `gym.make` docstring with a warning for `env_checker`
* Updated and fixed vector docstrings
* Update test names for reflect the project filename style
Co-authored-by: Markus Krimmel <montcyril@gmail.com>
* Add a minimal env checker on make
* Unpack the space checker for custom messages
* Update some dummy envs to use the right API
* Try to fix observation space checking
* And again
* Wrong env
* Swap the minimal env checker to the regular env checker.
Change the argument name
* Disable env checker for two test envs
* Conver env checker exception into warnings.
* Reenable env checker for test envs, it should only raise warning, no exceptions
* Fix edge case for out of bounds
This deals with the edge case where an object's corner may not be in the screen, but the object still overlaps and should be drawn.
* Calculate maximum diagonal for out of bounds calculation
* Add action in bound checks.
* add correct dtype to clip_action test.
* ensure correct dtype in tests.
* action check in car_racing no more needed.
* Prune PR. parametrize tests with spec_list.
* revert changes.
* remove file.
* remove magic number.
* test both upper and lower bound for every action.
* assert oob is really out of bound. also bugfix in action performed
* valide car racing discrete action. Add docstrings. Include car racing discrete in tests.
Co-authored-by: Gianluca De Cola <gianluca.decola@ags-it.com>
* create torque function
* create comment for torque function
* remove second arg from ApplyTorque
* lower torque mag wind power to 20%
* Add torque_power as kwarg
* Use torque_power in ApplyTorque function
* Set torque_wind kwarg default to 1.5
* Update version history for torque_power
* Updated version 2 history for 0.24
* Updated arguments to include torque_power
* Update assert for wind_power and torque_power can equal 0.0
* Update version history for v2
* Change torque_wind to turbulance_wind
* Remove assert for wind_power, turbulence_power. Add warnings for wind_power, turbulence_power. Add recommendations for wind_power, turbulence_power to docs.
* Update docs definition/recommended values for wind_power, turbulence_power
* Add `v` before `0.24` version description
* Improve performance for car racing rendering
This change eliminates unnecessary drawing by pygame if it is out of bounds
* Fix format with black
* Fix out of bounds condition
* Added docstrings for spaces, WIP
* Formatting changes
* Use raw docstring for Box.sample
* Formatting fix
* Formatting fix
* Use :class:, :meth:, formatting fixes, resolve TODO, use Optional
* 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
* Place try except around all imports for pygame and optional modules in box2d, classic_control and toy_text
* Updated all ImportErrors to DependencyNotInstalled
* Re-add comment on why pygame is imported
* fix impulse sample bug and add adjustable gravity
* revert weird sample thing
* assertation
* add wind
* fix wind to use applyforce
* black
* add tests for wind
* fix test bug
* run lunar lander tests over 10 runs
* reduce wind for heuristic landing
* made wind power kwarg
* reduce wind power for heuristic landing
* update doc
* remove wind power from kwarg
* fix tests by deleting tests ;)
* Add back wind power as kwarg
* the black sheep
* remove rogue plus
* slight doc fix and variable rename
* fix bug with track turn indicators
* black
* add discrete environment for carracing
* update docs
* reduce acceleration magnitude
* reduce wind power to near nothing for heuristic landings
* undo change on this branch
* change actions
* remove redundant import
* fix docs
* 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
* Remove orphan comment
The comment used to be due to the line that is not there anymore, like:
```python
from gym.envs.mujoco.mujoco_env import MujocoEnv
# ^^^^^ so that user gets the correct error
# message if mujoco is not installed correctly
```
Now the comment is useless.
* Update __init__.py
* Add a case for the Box shape where the low and high values are both scalars
* Add seeding.RandomNumberGenerator parameter to Dict seed. Modify __repr__ for the dictionary space string looks similar to an actual dictionary
* Add seeding.RandomNumberGenerator parameter to Multi Binary seed
* Add seeding.RandomNumberGenerator parameter to Multi Binary seed. Modify nvec typing to include np.ndarray
* Space seed typing can be a seeding.RandomNumberGenerator. If a seeding.RNG is provided then it is assigned to _np_random and .seed is not run
* Fixed the tuple seeding type as List[int] is not a valid Space seed type
* Added typing to batch_space. The batch_space seed is equal to the space's seeding
* Fixed the seeding type
* Add test for batch space seeds are identical to the original space's seeding
* Add equivalence function for RandomNumberGenerator comparing the bit_generator.state
* The batch_space functions uses a copy of the seed for the original space
* Set the action space seed for sync_vector_env seed testing
* Add test for the seeding of the sync vector environment
* Update the test_batch_space_seed to check the resulting sampling are equivalent for testing
* Revert representation back to the original version
* Remove additional Box shape initialisation
* Remove additional typing of MultiDiscrete
* Fixed bug of Space batch space where the original space's np_random is not a complete copy of the original space
* Add CustomSpace to the batched space seed test
* Modify the CustomSpace sample to produce a random number not a static value
* Fix CustomSpace to reflect the sample function
* Copy the space.np_random for the batched_space seed to ensure that the original space doesn't sampling doesn't effect the batched_space
* Parameterized the batch_space_seed, added testing for rng_different_at_each_index and test_deterministic
* Black and isort pre-commit changes
* Pre-commit fix
* MacOS, test_read_from_shared_memory throws an error that the inner _process_write function was unpicklable. Making the function a top-level function solves this error
* Fixed typing of seed where a space's seed function differs from Space.seed's typing
* Added check that the sample lengths are equal and explicitly provided the number of batched spaces n=1
* Removed relative imports for absolute imports
* Use deepcopy instead of copy
* Replaces `from numpy.testing._private.utils import assert_array_equal` with `from numpy.testing import assert_array_equal`
* Using the seeding `__eq__` function, replace `np_random.bit_generator.state` with `np_random`
* Added docstrings and comments to the tests to explain their purpose
* Remove __eq__ from RandomNumberGenerator and add to tests/vector/utils
* Add sync vector determinism test for issue #2680
* Fixed bug for 462101d384 (r850740825)
* Made the new seeds a list of integers
* 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
* refactoring play function. Tests for keys to action mapping.
* Add mocking pygame events.
* partial event processing in class.
* pre-commit.
* quit pygame after tests.
* fix typos in functions names.
* Add type hint.
* Add test for play function.
* remove mockKeyEvent.
* remove unused main code.
* Adding type hints.
* catch custom exception in tests.
* Fix magic numbers.
* Add test with an actual environment.
* fix comment.
* Add TODO memo on env.render.
* change map with list comprehension.
* remove unused imports.
* Add type hint.
* typo.
* docstring.
* fix impulse sample bug and add adjustable gravity
* revert weird sample thing
* assertation
* add wind
* fix wind to use applyforce
* black
* add tests for wind
* fix test bug
* run lunar lander tests over 10 runs
* reduce wind for heuristic landing
* made wind power kwarg
* reduce wind power for heuristic landing
* update doc
* remove wind power from kwarg
* fix tests by deleting tests ;)
* Add back wind power as kwarg
* the black sheep
* remove rogue plus
* slight doc fix and variable rename
* fix bug with track turn indicators
* black
* first commit domain randomize
* black
* update doc
* add some type hints and internalized some functions
* we were told, the black bear is innocent; but I should not like to trust
myself wit him
* Don't need two color conventions
* don't multiply twice
* hardcore -> domain_randomize & register
* remove rogue decorator
* fix impulse sample bug and add adjustable gravity
* revert weird sample thing
* assertation
* add wind
* fix wind to use applyforce
* black
* add tests for wind
* fix test bug
* run lunar lander tests over 10 runs
* reduce wind for heuristic landing
* made wind power kwarg
* reduce wind power for heuristic landing
* update doc
* remove wind power from kwarg
* fix tests by deleting tests ;)
* Add back wind power as kwarg
* the black sheep
* remove rogue plus