Commit Graph

1668 Commits

Author SHA1 Message Date
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
Mark Towers
134de4a713 Updates the environment checker (#2864)
* 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

* Revert rewrite setup.py changes

* Remove smart formatting for 3.6 support

* Fixed `check_action_space` and `check_observation_space`

* Added disable_env_checker to vector.make such that env_checker would only run on the first environment created.

* Removing check that different seeds would produce different initialising states

* Use the unwrapped environment np_random

* Fixed vector environment creator
2022-06-06 11:21:45 -04:00
Mark Towers
9fa7ede1e3 Forwards all np_random assignments to the actual environment and prevent access to the _np_random in wrappers (#2857) 2022-06-06 09:56:51 -04:00
Gianluca De Cola
fa01fdad9d fix docstring. (#2868) 2022-06-06 09:14:03 -04:00
J K Terry
6744d53aec remove unuseful comments 2022-06-06 09:04:16 -04:00
Rodrigo de Lazcano
8a323c9479 Fix issue #2860 (#2861)
* fix arguments key callback

	* close env in renderer

	* mujoco_rendering close base method
2022-06-04 14:28:31 -04:00
Mark Towers
9147790e96 Fixed the docstring to reflect the actual environment implementation (#2858) 2022-06-02 14:50:26 -04:00
Gianluca De Cola
83dac2c934 Test BipedalWalker hardcore kwargs. Refer to #2767 (#2841)
* test hardcore environment creation.

* add type hint.

* typo.
2022-06-02 14:19:17 -04:00
Mark Towers
53ff70eed8 Fixed doc strings for the website (#2846) 2022-06-02 08:01:21 -04:00
Jordan Terry
6b1e30dd4a show readme as pypi description 2022-06-01 00:24:11 -04:00
Jordan Terry
0e99e3c624 Added support for unpickling legacy Box (#2851) (#2854)
Co-authored-by: Mark Towers <mark.m.towers@gmail.com>
2022-05-31 23:53:13 -04:00
Jordan Terry
34fba52e4b Update LICENSE.md 2022-05-30 20:05:04 -04:00
Ariel Kwiatkowski
6c8abeff15 Remove a redundant warning in registration (#2850)
* Update registration.py

* Style
2022-05-30 10:38:20 -04:00
Alessio Quaglino
1b09a7eb08 Remove operations from xml files (#2843)
Inserting operations in the xml file cases MuJoCo to ignore the operation and set to zero the following numbers
2022-05-27 18:53:00 -04:00
Mark Towers
e89b00c363 Updated the gym version to v0.24 (#2839) 2022-05-25 10:29:51 -04:00
Mark Towers
0263deb5ab Add support for python 3.6 (#2836)
* 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
2022-05-25 10:28:19 -04:00
Mark Towers
273e3f22ce Updated docstrings using darglint (#2827)
* 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
2022-05-25 09:46:41 -04:00
Mark Towers
4487008ea9 Mujoco and Website Docstring fixes (#2834)
* Fixed minor docstring issues found on the website

* Updated the top docstrings with mujoco environments that fixed the observation and action tables. Added v4 gym.make code
2022-05-24 18:09:05 -04:00