2022-11-29 23:37:53 +00:00
---
title: Experimental
---
# Experimental
```{toctree}
:hidden:
experimental/functional
experimental/wrappers
experimental/vector
experimental/vector_wrappers
```
## Functional Environments
2022-12-04 22:24:02 +08:00
The gymnasium ``Env`` provides high flexibility for the implementation of individual environments however this can complicate parallelism of environments. Therefore, we propose the :class:` gymnasium.experimental.FuncEnv` where each part of environment has its own function related to it.
2022-11-29 23:37:53 +00:00
## Wrappers
Gymnasium already contains a large collection of wrappers, but we believe that the wrappers can be improved to
* Support arbitrarily complex observation / action spaces. As RL has advanced, action and observation spaces are becoming more complex and the current wrappers were not implemented with these spaces in mind.
* Support for numpy, jax and pytorch data. With hardware accelerated environments, i.e. Brax, written in Jax and similar pytorch based programs, numpy is not the only game in town anymore. Therefore, these upgrades will use Jumpy for calling numpy, jax and torch depending on the data.
* More wrappers. Projects like Supersuit aimed to bring more wrappers for RL however wrappers can be moved into Gymnasium.
* Versioning. Like environments, the implementation details of wrapper can cause changes agent performance. Therefore, we propose adding version numbers with all wrappers.
* In v28, we aim to rewrite the VectorEnv to not inherit from Env, as a result new vectorised versions of the wrappers will be provided.
### Lambda Observation Wrappers
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
```{eval-rst}
.. py:currentmodule:: gymnasium
2022-12-04 22:24:02 +08:00
.. list-table::
2022-11-29 23:37:53 +00:00
:header-rows: 1
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
* - Old name
- New name
- Vector version
- Tree structure
* - :class:`wrappers.TransformObservation`
- :class:`experimental.wrappers.LambdaObservationV0`
- VectorLambdaObservation
- No
* - :class:`wrappers.FilterObservation`
2022-12-03 19:45:39 +00:00
- :class:`experimental.wrappers.FilterObservation`
2022-11-29 23:37:53 +00:00
- VectorFilterObservation (*)
- Yes
* - :class:`wrappers.FlattenObservation`
2022-12-03 19:45:39 +00:00
- `:class:` experimental.wrappers.FlattenObservation`
2022-11-29 23:37:53 +00:00
- VectorFlattenObservation (*)
- No
* - :class:`wrappers.GrayScaleObservation`
2022-12-03 19:45:39 +00:00
- `:class:` experimental.wrappers.GrayscaleObservation`
2022-11-29 23:37:53 +00:00
- VectorGrayscaleObservation (*)
- Yes
* - :class:`wrappers.ResizeObservation`
2022-12-03 19:45:39 +00:00
- :class:`experimental.wrappers.ResizeObservation`
2022-11-29 23:37:53 +00:00
- VectorResizeObservation (*)
- Yes
* - Not Implemented
2022-12-03 19:45:39 +00:00
- :class:`experimental.wrappers.ReshapeObservation`
2022-11-29 23:37:53 +00:00
- VectorReshapeObservation (*)
- Yes
* - Not Implemented
2022-12-03 19:45:39 +00:00
- :class:`experimental.wrappers.RescaleObservation`
2022-11-29 23:37:53 +00:00
- VectorRescaleObservation (*)
- Yes
* - Not Implemented
2022-12-03 19:45:39 +00:00
- :class:`experimental.wrappers.DtypeObservation`
2022-11-29 23:37:53 +00:00
- VectorDtypeObservation (*)
- Yes
2022-12-03 19:45:39 +00:00
* - :class:`wrappers.PixelObservationWrapper`
2022-12-04 22:24:02 +08:00
- PixelObservation
2022-12-03 19:45:39 +00:00
- VectorPixelObservation
- No
2022-11-29 23:37:53 +00:00
* - :class:`NormalizeObservation`
2022-12-04 22:24:02 +08:00
- NormalizeObservation
2022-11-29 23:37:53 +00:00
- VectorNormalizeObservation
- No
* - :class:`TimeAwareObservation`
- TimeAwareObservation
- VectorTimeAwareObservation
- No
* - :class:`FrameStack`
- FrameStackObservation
- VectorFrameStackObservation
- No
* - Not Implemented
- DelayObservation
- VectorDelayObservation
- No
* - :class:`AtariPreprocessing`
- AtariPreprocessing
- Not Implemented
- No
```
### Lambda Action Wrappers
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
```{eval-rst}
.. py:currentmodule:: gymnasium
2022-12-04 22:24:02 +08:00
.. list-table::
2022-11-29 23:37:53 +00:00
:header-rows: 1
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
* - Old name
- New name
- Vector version
- Tree structure
* - Not Implemented
- :class:`experimental.wrappers.LambdaActionV0`
- VectorLambdaAction
- No
* - :class:`wrappers.ClipAction`
- ClipAction
- VectorClipAction (*)
- Yes
* - :class:`wrappers.RescaleAction`
- RescaleAction
- VectorRescaleAction (*)
- Yes
* - Not Implemented
- NanAction
- VectorNanAction (*)
- Yes
* - Not Implemented
- StickyAction
- VectorStickyAction
- No
```
### Lambda Reward Wrappers
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
```{eval-rst}
.. py:currentmodule:: gymnasium
2022-12-04 22:24:02 +08:00
.. list-table::
2022-11-29 23:37:53 +00:00
:header-rows: 1
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
* - Old name
- New name
- Vector version
* - :class:`wrappers.TransformReward`
- :class:`experimental.wrappers.LambdaRewardV0`
- VectorLambdaReward
* - Not Implemented
- :class:`experimental.wrappers.ClipRewardV0`
- VectorClipReward (*)
* - Not Implemented
- RescaleReward
- VectorRescaleReward (*)
* - :class:`wrappers.NormalizeReward`
- NormalizeReward
- VectorNormalizeReward
```
### Common Wrappers
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
```{eval-rst}
.. py:currentmodule:: gymnasium
2022-12-04 22:24:02 +08:00
.. list-table::
2022-11-29 23:37:53 +00:00
:header-rows: 1
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
* - Old name
- New name
- Vector version
* - :class:`wrappers.AutoResetWrapper`
- AutoReset
- VectorAutoReset
* - :class:`wrappers.PassiveEnvChecker`
- PassiveEnvChecker
- VectorPassiveEnvChecker
* - :class:`wrappers.OrderEnforcing`
- OrderEnforcing
2022-12-04 22:24:02 +08:00
- VectorOrderEnforcing (*)
2022-11-29 23:37:53 +00:00
* - :class:`wrappers.EnvCompatibility`
- Moved to `shimmy <https://github.com/Farama-Foundation/Shimmy/blob/main/shimmy/openai_gym_compatibility.py>` _
- Not Implemented
2022-12-03 19:46:01 +00:00
* - :class:`wrappers.RecordEpisodeStatistics`
2022-11-29 23:37:53 +00:00
- RecordEpisodeStatistics
- VectorRecordEpisodeStatistics
2022-12-03 19:46:01 +00:00
* - :class:`wrappers.RenderCollection`
2022-11-29 23:37:53 +00:00
- RenderCollection
- VectorRenderCollection
2022-12-03 19:46:01 +00:00
* - :class:`wrappers.HumanRendering`
2022-11-29 23:37:53 +00:00
- HumanRendering
- Not Implemented
* - Not Implemented
2022-12-03 19:46:01 +00:00
- :class:`experimental.wrappers.JaxToNumpy`
- VectorJaxToNumpy (*)
2022-11-29 23:37:53 +00:00
* - Not Implemented
2022-12-03 19:46:01 +00:00
- :class:`experimental.wrappers.JaxToTorch`
- VectorJaxToTorch (*)
2022-11-29 23:37:53 +00:00
```
### Vector Only Wrappers
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
```{eval-rst}
.. py:currentmodule:: gymnasium
2022-12-04 22:24:02 +08:00
.. list-table::
2022-11-29 23:37:53 +00:00
:header-rows: 1
2022-12-04 22:24:02 +08:00
2022-11-29 23:37:53 +00:00
* - Old name
- New name
* - :class:`wrappers.VectorListInfo`
- VectorListInfo
```
## Vector Environment
These changes will be made in v0.28
## Wrappers for Vector Environments
These changes will be made in v0.28