Synthetic gymnax environments
Project description
Synthetic Gymnax
💡 Make a one-line change ...
Simply replace | by |
---|---|
import gymnax
env, params = gymnax.make("CartPole-v1")
... # your training code
|
import gymnax, synthetic_gymnax
env, params = gymnax.make("Synthetic-CartPole-v1")
# add 'synthetic' to env: ^^^^^^^^^^
... # your training code
|
💨 ... and enjoy fast training.
The synthetic environments are meta-learned to train agents within 10k time steps. This can be much faster than training in the real environment, even when using tuned hyperparameters!
- 🟩 Real environment training, using tuned hyperparameters (IQM of 5 training runs)
- 🟦 Synthetic environment training, using any reasonable hyperparameters (IQM performance of 20 training runs with random HP configurations)
🏅 Performance of agents after training for 10k synthetic steps
Classic control: 10k synthetic 🦶 | |||||
---|---|---|---|---|---|
Environment | PPO | SAC | DQN | DDPG | TD3 |
Synthetic-Acrobot-v1 | -84.1 | -85.3 | -82.6 | - | - |
Synthetic-CartPole-v1 | 500.0 | 500.0 | 500.0 | - | - |
Synthetic-Mountaincar-v0 | -181.8 | -170.1 | -118.4 | - | - |
Synthetic-CountinuousMountainCar-v0 | 66.9 | 91.1 | - | 97.6 | 97.5 |
Synthetic-Pendulum-v1 | -205.4 | -188.3 | - | -164.3 | -168.5 |
Brax: 10k synthetic, 5m real 🦶 | ||||||||
---|---|---|---|---|---|---|---|---|
Environment | PPO | SAC | DDPG | TD3 | ||||
Synthetic | Real | Synthetic | Real | Synthetic | Real | Synthetic | Real | |
halfcheetah | 1657.4 | 3487.1 | 5810.4 | 7735.5 | 6162.4 | 3263.3 | 6555.8 | 13213.5 |
hopper | 853.5 | 2521.9 | 2738.8 | 3119.4 | 3012.4 | 1536.0 | 2985.3 | 3325.8 |
humanoidstandup | 13356.1 | 17243.5 | 21105.2 | 23808.1 | 21039.0 | 24944.8 | 20372.0 | 28376.2 |
swimmer | 348.5 | 83.6 | 361.6 | 124.8 | 365.1 | 348.5 | 365.4 | 232.2 |
walker2d | 858.3 | 2039.6 | 1323.1 | 4140.1 | 1304.3 | 698.3 | 1321.8 | 4605.8 |
💫Replicating our results
We provide the configurations used in meta-training the checkpoints for synthetic environments in synthetic_gymnax/checkpoints/*environment*/config.yaml
. They can be used with the meta-learning script by calling e.g.
python examples/metalearn_synthenv.py --config synthetic_gymnax/checkpoints/hopper/config.yaml
Please note that when installing via pip, the configs are not bundled with the package. Please clone the repository to get them.
✍ Citing and more information
If you use the provided synthetic environments in your work, please cite us as
@article{
...
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file synthetic_gymnax-0.0.1.tar.gz
.
File metadata
- Download URL: synthetic_gymnax-0.0.1.tar.gz
- Upload date:
- Size: 133.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d6740a9ff0b39233eea2fd9572a58e66b831d63970e99aa9b28e6c7c9120c6a |
|
MD5 | 8be832ee73066bda24e5d5a3a6abdd1f |
|
BLAKE2b-256 | 8725fd504663a143a676c414342f65c2b9b9ba24da76a3e8b8013c860bac3a10 |
File details
Details for the file synthetic_gymnax-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: synthetic_gymnax-0.0.1-py3-none-any.whl
- Upload date:
- Size: 135.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bde64190e0b2c75d3726e4b733282195f6725c55451bc78822e836fa5c837e11 |
|
MD5 | d944db5317990ec2bd6c989f17adb6c4 |
|
BLAKE2b-256 | 91be2d31a447d7c4dbf3dd7e8b27085068c53135348083babe18a278b297cedf |