Experimental#

Functional Environments#

The gymnasium Env provides high flexibility for the implementation of individual environments however this can complicate parallelism of environments. Therefore, we propose the gymnasium.experimental.FuncEnv where each part of environment has its own function related to it.

Wrappers#

Gymnasium already contains a large collection of wrappers, but we believe that the wrappers can be improved to

  • (Work in progress) 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 this mind.

  • Support for Jax-based environments. 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, a project developed by Farama Foundation to provide automatic compatibility for NumPy, Jax and in the future PyTorch data for a large subset of the NumPy functions.

  • More wrappers. Projects like Supersuit aimed to bring more wrappers for RL, however, many users were not aware of the wrappers, so we plan to move the wrappers into Gymnasium. If we are missing common wrappers from the list provided above, please create an issue.

  • Versioning. Like environments, the implementation details of wrappers can cause changes in agent performance. Therefore, we propose adding version numbers to all wrappers, i.e., LambaActionV0. We don’t expect these version numbers to change regularly similar to environment version numbers and should ensure that all users know when significant changes could affect your agent’s performance. Additionally, we hope that this will improve reproducibility of RL in the future, this is critical for academia.

  • In v28, we aim to rewrite the VectorEnv to not inherit from Env, as a result new vectorized versions of the wrappers will be provided.

We aimed to replace the wrappers in gymnasium v0.30.0 with these experimental wrappers.

Observation Wrappers#

Action Wrappers#

Reward Wrappers#

Common Wrappers#

Rendering Wrappers#

Environment data conversion#

Vector Environment#

These changes will be made in v0.28

Wrappers for Vector Environments#

These changes will be made in v0.28