Commit Graph

13 Commits

Author SHA1 Message Date
Ariel Kwiatkowski
c364506710 Seeding update (#2422)
* 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
2021-12-08 16:14:15 -05:00
Elijah K
9ae4331dfd Py36+ syntax in gym/wrappers: derived by running pyupgrade --py36-plus gym/wrappers/**.py and flynt gym --ll 120 (#2464)
Co-authored-by: Ilya Kamen <ilya.kamenshchikov@bosch.com>
2021-11-13 19:53:06 -05:00
Ariel Kwiatkowski
d199778b9e Pendulum updates (#2423)
* Pendulum env updates

Simplify the math a bit (no difference in behavior)

* Reorder the clipping of angular velocity

* Bump version of Pendulum

* black

* Update mentions of Pendulum-v0 to Pendulum-v1.
2021-09-25 14:00:28 -04:00
jfpettit
0b07221d84 change FrameStack wrapper to inherit from ObservationWrapper (#2378) 2021-09-01 12:09:43 -04:00
J K Terry
3abd5d55af remove wrapper deprication (#2273) 2021-07-29 17:51:02 -04:00
J K Terry
78d2b512d8 redo black (#2272) 2021-07-29 15:39:42 -04:00
Justin Terry
e9d2c41f2b redo black 2021-07-29 12:42:48 -04:00
Justin Terry
3133e99a64 deprecate built in wrappers for supersuit 2021-07-28 22:21:47 -04:00
Christian Clauss
bb81e141ea Blacken the codebase (#2265) 2021-07-28 20:26:34 -04:00
Kristian Holsheimer
5ff4e7d750 Bug fix, missing attrs: dtype, shape (#1950) 2020-06-19 14:16:02 -07:00
Kristian Holsheimer
074bc269b5 Rewrite LazyFrames.__getitem__ to only decompress if needed (#1906)
* add last_frame property to LazyFrames

* drop LazyFrames.last_frame and rewrite __getitem__ instead
2020-06-05 15:01:04 -07:00
johannespitz
a8a3d36353 Add shape property and equality operation to LazyFrames (#1862)
* Add shape property and equality operation to LazyFrames for simplified usage in tests

* Fix shape property with lz4_compress
2020-04-10 17:10:10 -05:00
Xingdong Zuo
80a6d089b7 [Wrappers]: add LazyFrames, FrameStack (#1485)
* Create frame_stack.py

* Update __init__.py

* Create test_frame_stack.py

* Update test_frame_stack.py

* Update frame_stack.py

* Update test_frame_stack.py

* Update __init__.py

* Update test_frame_stack.py

* Update test_frame_stack.py

* Update frame_stack.py

* Update gym/wrappers/frame_stack.py

Thanks !

Co-Authored-By: Kristian Hartikainen <kristian.hartikainen@gmail.com>

* Update gym/wrappers/frame_stack.py

Thanks !

Co-Authored-By: Kristian Hartikainen <kristian.hartikainen@gmail.com>

* make framestack tests actually run (with and without lz4)
2019-08-23 14:04:11 -07:00