gym-simple
is a Gymnasium wrapper for the Simple
simulator. It provides an interface for using Simple
with reinforcement learning environments. It shows the usage with various default environments (ant, hopper, half cheetah, and inverted pendulum).
You can easily integrate these environments into a reinforcement learning workflow and start experimenting with Simple
.
To install gym-simple
in an editable mode (useful for development), run the following commands:
-
Clone the repository:
git clone https://github.com/fabinsch/gym-simple.git cd gym-simple
-
Install the package in editable mode:
pip install -e .
Optionally: start a meshcat-server
if you want to visualize the final policy and make sure that the --zmq_url
argument matches (default="tcp://127.0.0.1:6000"
).
To run the train script, you need sb3 and sbx: pip install sbx-rl stable-baselines3
.
python train.py --algo SAC --env Hopper --render
You can stop the training whenever you want by using ctrl+c
and it will visualize the current best policy (if --render
had been passed).