* 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
* Add typing to gym.make via literals
* Fix for type object not subscriptable
* Use Env[ObsType, ActType] instead of specific types to account for wrapping
* Move make and all overloads to `registration.py`
* Hack around py37 typing checks
* refactor: required version in env name
* refactor: rename env_id function
* refactor: regex + function logic
* test: some more edge cases + error
* refactor: version max/comparison
- Move version max/comparison in a method
- Remove type ignore to improve type checking
* fix: failing tests & error introduced in rebasing
* refactor: simplify map and remove type ignore
* refactor: remove _is_lesser_version() method
* refactor: _versions() to return NamedTuples
* chore: remove minor changes
* Refactor registration EnvSpec and EnvSpecTree
* test: move tests from #2513 here
* fix: typing
* test: try to fix unregistered env
* refactor: change InitVar id name for typing
Changed InitVar id name to fix the following typing error:
error: Declaration "id" is obscured by a declaration of the same name
* refactor: return only the first difflib match
* test: improve tear down of added test env
* refactor: dataclass fields
* refactor: compile regex pattern only once
* refactor: `_assert_version_exists()`
`_assert_version_exists()` rewritten from @JesseFarebro:
https://github.com/openai/gym/pull/2535#discussion_r777573839
* refactor: latest_spec -> latest_versioned_spec
* fix: bug + typing + test
* Add default/versioned tests
* Fix Env field defaults
* feat: improve versioned/unversioned env handling
* Disallow versioned/unversioned registration/lookup
* test: remove warning + check default suggestion
Co-authored-by: Jesse Farebrother <jessefarebro@gmail.com>
* Typing in gym/envs/registration.py
* Add registration to type checked list
* Adds type hints to space.py
* Typing in gym.core.Env
* Typing in seeding.py
* fixup Typing after rebase
* revert accidental change
* Install dependencies in pyright runner
* fix: can only install dependencies after checkout
* fix: install types in a venv
* fix path
* skip env activation, install directly from venv interpreter
* absolute path to venv
* use central python installation
* skip one more typecheck
* cleanup gh actions .yml
* Add py.typed to signal using sources for typechecking
* black!
Co-authored-by: sj_petterson <sj_petterson@gmail.com>
Co-authored-by: J K Terry <justinkterry@gmail.com>
This introduces a new tree-like storage structures for environments
which allows for efficient lookups of what versions of an environment
are registered. Using this new data-structure we can give warnings
to users about outdated environments when `make` is called.
* Support kwargs in gym.make
We avoided adding kwargs for a long time in order to encourage people
to statically register their environment definitions. However, over
time we've found a few important use-cases for kwargs, such as:
- Runtime-specific objects, such as which GPU to run the environment
on
- Parametrized environments, which can have an infinite number of meaningful
variants
The latter breaks the invariant that the environment ID alone
determines the semantics of the environment, but it's an advanced
use-case and such users should be able to manage this on their own.
* Export the register method so it's easier for external users to register environments
* Improve kwargs test
* Improve default import time from 750ms -> 73ms on 2016 Macbook pro
* Support code which expects gym.spaces.foo to work without a direct import of gym.spaces
* add dtype to Box
* remove board_game, debugging, safety, parameter_tuning environments
* massive set of breaking changes
- remove python logging module
- _step, _reset, _seed, _close => non underscored method
- remove benchmark and scoring folder
* Improve render("human"), now resizable, closable window.
* get rid of default step and reset in wrappers, so it doesn’t silently fail for people with underscore methods
* CubeCrash unit test environment
* followup fixes
* MemorizeDigits unit test envrionment
* refactored spaces a bit
fixed indentation
disabled test_env_semantics
* fix unit tests
* fixes
* CubeCrash, MemorizeDigits tested
* gym backwards compatibility patch
* gym backwards compatibility, followup fixes
* changelist, add spaces to main namespaces
* undo_logger_setup for backwards compat
* remove configuration.py
* Make sure env.spec always exists and is valid. Previously there was an error when you tried to get the string representation of an unregistered env.
* update changelist
* fix double reset, as suggested by @jietang
* better floors and ceilings
* add convenience methods to monitor
* add wrappers to gym namespace
* allow playing Atari games, with potentially more coming in the future
* simplify example in docs
* Move play out of the Env
* fix tests
* no more deprecation warnings
* remove env.monitor
* monitor simplification
* monitor simplifications
* monitor related fixes
* a few changes suggested by linter
* timestep_limit fixes
* keep track of gym env variables for future compatibility
* timestep_limit => max_episode_timesteps
* don't apply TimeLimit wrapper in make for VNC envs
* Respect old timestep_limit argument
* Pass max_episode_seconds through registration
* Don't include deprecation warnings yet