Commit Graph

1885 Commits

Author SHA1 Message Date
Mark Towers
f3f8a970b7 Fixed tests for Car racing v2 (#2964) 2022-07-14 08:35:02 -04:00
Mark Towers
ddce4a56c8 Bump Car racing and Remove Car Racing Discrete (#2963)
* Allows a new RNG to be generated with seed=-1 and updated env_checker to fix bug if environment doesn't use np_random in reset

* Revert "fixed `gym.vector.make` where the checker was being applied in the opposite case than was intended to (#2871)"

This reverts commit 519dfd9117.

* Remove bad pushed commits

* Fixed spelling in core.py

* Pins pytest to the last py 3.6 version

* Allow Box automatic scalar shape

* Add test box and change default from () to (1,)

* update Box shape inference with more strict checking

* Update the box shape and add check on the custom Box shape

* Removed incorrect shape type and assert shape code

* Update the Box and associated tests

* Move dependency error to inside the atari environment

* Update the gym version to v0.25.0

* Bump car racing and remove car racing discrete
2022-07-13 15:52:43 -04:00
Mark Towers
aeda7eb358 Version v0.25.0 release (#2949) 2022-07-13 09:47:08 -04:00
Mark Towers
634afec9bc Text space (#2959)
* Allows a new RNG to be generated with seed=-1 and updated env_checker to fix bug if environment doesn't use np_random in reset

* Revert "fixed `gym.vector.make` where the checker was being applied in the opposite case than was intended to (#2871)"

This reverts commit 519dfd9117.

* Remove bad pushed commits

* Fixed spelling in core.py

* Pins pytest to the last py 3.6 version

* Add Text space

* Add Text space

* Added Text space

* Updated comment

* Allow Box automatic scalar shape

* Add test box and change default from () to (1,)

* Refactored conditional

* Refactored contains()

* update Box shape inference with more strict checking

* Update the box shape and add check on the custom Box shape

* Removed incorrect shape type and assert shape code

* Update the Box and associated tests

* Move dependency error to inside the atari environment

* Update the gym version to v0.25.0

* Fixed bugs in Text space and tests

* Code review by Drew

Co-authored-by: Ryan Rudes <ryanrudes@gmail.com>
2022-07-11 11:39:04 -04:00
Mark Towers
015b31fa76 Bug fix, add tests for environment checker and passive environment checker wrapper (#2903) 2022-07-10 21:45:24 -04:00
Arjun KG
907b1b20dd New Step API with terminated, truncated bools instead of done (#2752) 2022-07-09 16:48:06 -04:00
Rodrigo de Lazcano
e3c05c2b59 split base mujoco env class (#2946) 2022-07-06 11:18:03 -04:00
Denis Khoshaba
571fcd6f9f improve docker image size (#2953) 2022-07-06 09:49:28 -04:00
Giovanni Minelli
c292d35d87 RecordVideo wrapper revived (#2894) 2022-07-06 07:10:56 -04:00
Pablo Samuel Castro
ca39816943 Add reset params (with np support) (#2926) 2022-07-06 07:08:01 -04:00
Mark Towers
071f0bf9c0 Fix error with import gym without cv2 (#2948) 2022-07-05 08:25:13 -04:00
Mark Towers
2ede09074f Full type hinting (#2942)
* Allows a new RNG to be generated with seed=-1 and updated env_checker to fix bug if environment doesn't use np_random in reset

* Revert "fixed `gym.vector.make` where the checker was being applied in the opposite case than was intended to (#2871)"

This reverts commit 519dfd9117.

* Remove bad pushed commits

* Fixed spelling in core.py

* Pins pytest to the last py 3.6 version

* Allow Box automatic scalar shape

* Add test box and change default from () to (1,)

* update Box shape inference with more strict checking

* Update the box shape and add check on the custom Box shape

* Removed incorrect shape type and assert shape code

* Update the Box and associated tests

* Remove all folders and files from pyright exclude

* Revert issues

* Push RedTachyon code review

* Add Python Platform

* Remove play from pyright check

* Fixed CI issues

* remove mujoco env type hinting

* Fixed pixel observation test

* Added some new type hints

* Fixed CI errors

* Fixed CI errors

* Remove play.py from exlucde pyright

* Fixed pyright issues
2022-07-04 13:19:25 -04:00
Markus Krimmel
9e66399b4e Try to fetch keys_to_action from environment, made tests stronger (#2945) 2022-07-01 18:08:01 -04:00
Markus Krimmel
cc7552f6de Properly check whether AttributeError is caused by render_mode (#2941) 2022-07-01 09:47:10 -04:00
Jet
f042d0beb9 Add option to change colour on carracing through "options" argument, remove carracingdomainrandomize registration (#2931)
* add option to change colour on carracing through "option"

* fix dict bug

* black

* add docs for reset arg

* fix thing

* remove randomize from registration

* update doc

* update docs

* update docs

* remove unnecessary argument

* fix thing

* fix thing

* f

* update docs

* add test

* remove unused import

* Update registration.py
2022-06-30 12:06:51 -04:00
Ariel Kwiatkowski
9c1d288a2d [WIP] Typing fixes (#2939)
* Update pyproject.toml

* Maybe fix typing for frozen lake and taxi

* Clean up pyproject a bit

* Reenable box2d pyright

* Disable box2d pyright

* Fix typing for toy text envs

* Narrow down pyright excludes for almost everything except mujoco

* Fix a wrapper test typing

* Remove env checker from excludes

* Remove redundant type hints which mess up pyright. And a typo fix.

* Remove test_spaces exclude

* Remove some redundant warnings

* Change pyright ignore to more specific

* Fix a weird private variable which gets explicitly exported for whatever reason. It's still exported for backwards compatibility, but internal code now uses a public variable.

* re-export the private variable

* Fix lunar_lander typing

* Remove lunar lander from excludes

* Small fix
2022-06-30 12:04:14 -04:00
KexianShen
2017f3ed9e Fix the initialization of render mode set (#2938) 2022-06-30 11:00:47 -04:00
Rodrigo de Lazcano
61a39f41bc Initialize observation spaces and pytest (#2929)
* Remove step initialization for mujoco obs spaces

	* remove step initialization for mujoco obs space

	* pre-commit

pytest obs space mujoco
2022-06-30 10:59:59 -04:00
Mark Towers
7f6effbc0d Inferring Box scalar shape (#2911)
* Allows a new RNG to be generated with seed=-1 and updated env_checker to fix bug if environment doesn't use np_random in reset

* Revert "fixed `gym.vector.make` where the checker was being applied in the opposite case than was intended to (#2871)"

This reverts commit 519dfd9117.

* Remove bad pushed commits

* Fixed spelling in core.py

* Pins pytest to the last py 3.6 version

* Allow Box automatic scalar shape

* Add test box and change default from () to (1,)

* update Box shape inference with more strict checking

* Update the box shape and add check on the custom Box shape

* Removed incorrect shape type and assert shape code

* Update the Box and associated tests
2022-06-29 11:17:25 -04:00
Rodrigo de Lazcano
0dba072046 remove sys.exit(0) mujoco render (#2930) 2022-06-28 08:54:10 -04:00
Mark Towers
024b0f5160 Added Action masking for Space.sample() (#2906)
* Allows a new RNG to be generated with seed=-1 and updated env_checker to fix bug if environment doesn't use np_random in reset

* Revert "fixed `gym.vector.make` where the checker was being applied in the opposite case than was intended to (#2871)"

This reverts commit 519dfd9117.

* Remove bad pushed commits

* Fixed spelling in core.py

* Pins pytest to the last py 3.6 version

* Add support for action masking in Space.sample(mask=...)

* Fix action mask

* Fix action_mask

* Fix action_mask

* Added docstrings, fixed bugs and added taxi examples

* Fixed bugs

* Add tests for sample

* Add docstrings and test space sample mask Discrete and MultiBinary

* Add MultiDiscrete sampling and tests

* Remove sample mask from graph

* Update gym/spaces/multi_discrete.py

Co-authored-by: Markus Krimmel <montcyril@gmail.com>

* Updates based on Marcus28 and jjshoots for Graph.py

* Updates based on Marcus28 and jjshoots for Graph.py

* jjshoot review

* jjshoot review

* Update assert check

* Update type hints

Co-authored-by: Markus Krimmel <montcyril@gmail.com>
2022-06-26 18:23:15 -04:00
J K Terry
d750eb8df0 fix some pixel art credits 2022-06-26 10:27:36 -04:00
Omar Younis
2fb6043a62 Fix: warning for mode in render with python 3.6 (#2927) 2022-06-25 14:10:55 -04:00
Markus Krimmel
94081fbc0a Pitch: Wrapper that adds human-mode rendering to any environment with rgb_array-rendering (#2719) 2022-06-24 16:25:58 -04:00
John Balis
f493aba9b6 tentative fix for render function showing changing dealer top card (#2920) 2022-06-24 09:59:49 -04:00
Ariel Kwiatkowski
51a6386a6b Revert "Parameterize initial state distributions for classic control envs. (#2921)" (#2923)
This reverts commit af918d81e0.
2022-06-23 18:21:37 -04:00
Pablo Samuel Castro
af918d81e0 Parameterize initial state distributions for classic control envs. (#2921) 2022-06-23 17:06:04 -04:00
Mark Towers
174c299697 Split test registration (#2900) 2022-06-23 08:54:50 -04:00
Markus Krimmel
4d57b864f8 Roll back mujoco docstrings (#2913) 2022-06-21 09:57:21 -04:00
Mark Towers
feea527a4f Remove pytest class in test pixel observation wrapper (#2902) 2022-06-19 17:05:56 -04:00
Quentin Gallouédec
979407f4c4 Fix check_observation_spaceand check_action_space inversion (#2909) 2022-06-19 16:52:26 -04:00
Mark Towers
08fbbf0e6c Mujoco metadata (#2904) 2022-06-19 16:50:31 -04:00
Mark Towers
f5f8479b00 Add vector make tests (#2901) 2022-06-19 16:50:07 -04:00
Mark Towers
528d878d57 Fixed action dim check (#2899) 2022-06-19 16:49:47 -04:00
Mark Towers
dc39a4ef8e Pin pytest to 7.0.1 (#2898) 2022-06-19 16:49:28 -04:00
Omar Younis
a7e1861f5c Fix: add mujoco render arguments to init (#2891)
* fix: add render_mode getter to Wrappers

* fix: add render args to mujoco init

* reformat

* add type hints
2022-06-16 12:29:50 -04:00
Omar Younis
f2aeb823f7 check render_mode in make (#2896) 2022-06-16 12:29:44 -04:00
Mark Towers
ffbf971171 Rewrite env tests (#2867) 2022-06-16 09:29:13 -04:00
Antonin RAFFIN
71f11a0642 Fix CarRacing termination (#2890) 2022-06-15 09:34:42 -04:00
Omar Younis
a5afdb3f7a fix: allow mode as argument (#2893)
* allow mode as argument

* change Wrapper render doc
2022-06-15 09:33:03 -04:00
Antonin RAFFIN
3498617bf0 Fix TimeLimit wrapper and add tests (#2888)
* Fix TimeLimit wrapper and add tests

* Slip test
2022-06-15 09:21:53 -04:00
Omar Younis
053ee80932 fix: add render_mode getter to Wrappers (#2884) 2022-06-12 21:55:24 -04:00
Giovanni Minelli
1a7a727b40 Updated FrozenLakeEnv docstring (#2877) 2022-06-12 09:09:09 -04:00
Tony Tran
721153286e Env Step Check allow rewards to be np int (#2879) 2022-06-10 11:10:53 -04:00
Jet
a6274a55f0 Add Graph to Spaces (#2869) 2022-06-09 10:42:58 -04:00
Rodrigo de Lazcano
f9e2b92e00 remove xml_file from mujoco args (#2872) 2022-06-09 09:38:18 -04:00
Mark Towers
519dfd9117 fixed gym.vector.make where the checker was being applied in the opposite case than was intended to (#2871) 2022-06-08 09:55:07 -04:00
Omar Younis
9acf9cd367 Render API (#2671)
* 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>
2022-06-07 18:20:56 -04:00
Mark Towers
66c431d4b3 Incremented the version to v24.1 (#2870) 2022-06-07 09:50:07 -04:00
Mark Towers
734bd4b577 Rewrite setup (#2865)
* Updated testing requirements based off extra["testing"]

* Updated setup to check the version is valid, added testing and all dependency groups and collects the requirements from requirements.txt to keep everything standardized.

* Updated requirements.txt based on the current minimum gym requirements.txt to work

* Updated requirements.txt based on the current minimum gym requirements.txt to work

* Updated test_requirements.txt based on the current gym full testing requirements

* Pre-commit updates

* Add integer check for the `n` parameter

* The type of self.spaces is an Iterable which is absorbed by the tuple.

* Simplifies the environment checker to two files, env_checker.py and passive_env_checker.py with a new wrapper env_checker.py

* Adds the passive environment checker on `gym.make`

* Ignore the `check_env` warn parameter

* Ignore the `check_env` warn parameter

* Use the `data_equivalence` function

* Remove env_checker PR changes

* Move pip install pytest and mock to py 3.6

* Update setup.py and requirements.txt
2022-06-06 17:27:34 -04:00