* 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
* 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>
* Moved pygame imports into render
* Formatting
* Make pygame optional for box2d, try to make formatting work
* fix tests, fix pre-commit.
Co-authored-by: Ariel Kwiatkowski <ariel.j.kwiatkowski@gmail.com>
Co-authored-by: Gianluca De Cola <gianluca.decola@ags-it.com>
* Fixed warnings produced by test_record_video.py and test_video_recorder.py by using the self._frames_per_sec value as default value if video.frames_per_second is missing
* The default backward compatible values if video.frames_per_second and video.output_frames_per_seconds are the updated frames_per_sec and output_frames_per_sec values
* Added check for return_info, only warn about missing render_fps if human mode is available
* Require render_fps if any kind of rendering is implemented