Releases: RobertTLange/gymnax
Fix requirements for plotting
[v0.0.8] - 21/04/2024
Fix import errors for matplotlib
and seaborn
visualization.
🧮 Type Hints & Fixes
[v0.0.7] - 04/04/2024
Fixed most of the typing issues under pylint --strict. 1.1 This required unifying the interface of step, step_env, get_obs, 'is_terminal` for proper inheritance.
spaces now depends on gymnasium instead of gym, adding an additional dependency. Maybe later on gym dependency can be completely removed since it's not maintained anymore? haven't looked into that.
Removed _DeviceArray from the tests as it's deprecated. Uses jax version 0.4.24
Ran everything in python 3.10 so technically you could support that too now.
In wrapper/brax.py, GymnaxtoBraxWrapper has two new methods backend and observation_size, as its required to be defined under newest brax version. Used brax version 0.10.0.
Thanks to @Aidandos !
Wrappers, Reacher, Swimmer, Pong 🕹
[v0.0.6] - 12/04/2023
Added
- Gym, EvoJAX, Brax, DM env wrappers
- Reacher environment inspired by Lenton et al. (2021)
- Swimmer environment inspired by Lenton et al. (2021)
- Basic Pong environment inspired by Kirsch (2018)
Fixed
- Fixed Minatar tests for jax arrays.
- Fixed reward setting in
DiscountingChain-v0
- Fixed
Tuple
space check via enumerate.
Changed
- Refactored wrappers into separate sub-directory.
Fix tree_multimap & greedy device grabbing
[v0.0.5] - 24/08/2022
Fixed
- Fix deprecated
tree_multimap
to simpletree_map
. - Fix device grabbing when using an
jnp.array
to set default in Acrobot env.
Welcome to gymnax 🤗
Public Release - Basic gymnax
API Usage 🍲
import jax
import gymnax
rng = jax.random.PRNGKey(0)
rng, key_reset, key_act, key_step = jax.random.split(rng, 4)
# Instantiate the environment & its settings.
env, env_params = gymnax.make("Pendulum-v1")
# Reset the environment.
obs, state = env.reset(key_reset, env_params)
# Sample a random action.
action = env.action_space(env_params).sample(key_act)
# Perform the step transition.
n_obs, n_state, reward, done, _ = env.step(key_step, state, action, env_params)
Quick Fix Imports
[v0.0.3] - 15/06/2022
Fixed
- Fix import structure.
New API & Evosax GymFitness Backend
[v0.0.2] - 15/06/2022
Added
- Fully functional API using flax-style
EnvState
andEnvParams
for callingenv.step
. - MinAtar environments are not operational yet.
- Release to ensure that
evosax
0.0.9 release can work withGymFitness
backend ingymnax
.
Changed
- Basically everything :)
Welcome to gymnax
Classic Open AI gym wrapper including gymnax.make
, env.reset
, env.step
:
import jax
import gymnax
rng = jax.random.PRNGKey(0)
rng, key_reset, key_policy, key_step = jax.random.split(rng, 4)
env, env_params = gymnax.make("Pendulum-v1")
obs, state = env.reset(key_reset, env_params)
action = env.action_space(env_params).sample(key_policy)
n_obs, n_state, reward, done, _ = env.step(key_step, state, action, env_params)