From c762fc4621847d70eb0c3829707aa1e4d65d0a7a Mon Sep 17 00:00:00 2001 From: rickstaa Date: Sun, 9 Jul 2023 22:52:53 +0200 Subject: [PATCH] docs: improve docs --- docs/source/envs/envs.rst | 8 ++++++-- examples/use_stable_gym.py | 4 ++-- stable_gym/envs/mujoco/swimmer_cost/README.md | 2 +- stable_gym/envs/mujoco/swimmer_cost/swimmer_cost.py | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/source/envs/envs.rst b/docs/source/envs/envs.rst index bb044422..f143a49e 100644 --- a/docs/source/envs/envs.rst +++ b/docs/source/envs/envs.rst @@ -21,7 +21,7 @@ Gym environments that are based on Biological systems. Classic control environments ---------------------------- -Environments for classical control theory problems. +Environments that are based on the `classical control gymnasium environments`_. .. toctree:: :maxdepth: 1 @@ -29,16 +29,20 @@ Environments for classical control theory problems. ./classic_control/ex3_ekf.rst ./classic_control/cartpole_cost.rst +.. _`classical control gymnasium environments`: https://gymnasium.farama.org/environments/classic_control + Mujoco environments ------------------- -Environments that are based on the MuJoCo physics engine. +Environments that are based on the `mujoco gymnasium environments`_. .. toctree:: :maxdepth: 1 ./mujoco/swimmer_cost.rst +.. _`mujoco gymnasium environments`: https://gymnasium.farama.org/environments/mujoco + Robotics environment -------------------- diff --git a/examples/use_stable_gym.py b/examples/use_stable_gym.py index 5e3c4b32..cb4287c5 100644 --- a/examples/use_stable_gym.py +++ b/examples/use_stable_gym.py @@ -3,10 +3,10 @@ import stable_gym # noqa: F401 -ENV_NAME = "Oscillator-v1" +# ENV_NAME = "Oscillator-v1" # ENV_NAME = "Ex3EKF-v1" # ENV_NAME = "CartPoleCost-v1" -ENV_NAME = "Swimmer-v4" +ENV_NAME = "SwimmerCost-v1" if __name__ == "__main__": env = gym.make(ENV_NAME, render_mode="human") diff --git a/stable_gym/envs/mujoco/swimmer_cost/README.md b/stable_gym/envs/mujoco/swimmer_cost/README.md index 84508b4c..3a298390 100644 --- a/stable_gym/envs/mujoco/swimmer_cost/README.md +++ b/stable_gym/envs/mujoco/swimmer_cost/README.md @@ -5,7 +5,7 @@
-An actuated two-jointed swimmer. This environment corresponds to the [Swimmer-v2](https://gym.openai.com/envs/Swimmer-v2/) environment included in the OpenAI gym package. It is different in the fact that: +An actuated two-jointed swimmer. This environment corresponds to the [Swimmer-v4](https://gymnasium.farama.org/environments/mujoco/swimmer) environment included in the [gymnasium package](https://gymnasium.farama.org/). It is different in the fact that: * The objective was changed to a speed-tracking task. To do this, the reward is replaced with a cost. This cost is the squared difference between the swimmer's forward speed and a reference value (error). diff --git a/stable_gym/envs/mujoco/swimmer_cost/swimmer_cost.py b/stable_gym/envs/mujoco/swimmer_cost/swimmer_cost.py index 618e78c1..9712731f 100644 --- a/stable_gym/envs/mujoco/swimmer_cost/swimmer_cost.py +++ b/stable_gym/envs/mujoco/swimmer_cost/swimmer_cost.py @@ -20,7 +20,7 @@ class SwimmerCost(SwimmerEnv): Source: This is a modified version of the swimmer Mujoco environment in v0.28.1 of the - :gymnasium:`gymnasium library `. This modification was first + :gymnasium:`gymnasium library `. This modification was first described by `Han et al. 2020 `_. Compared to the original Swimmer environment in this modified version: @@ -31,7 +31,7 @@ class SwimmerCost(SwimmerEnv): The rest of the environment is the same as the original Swimmer environment. Below, the modified cost is described. For more information about the environment (e.g. observation space, action space, episode termination, etc.), please refer - to the :gymnasium:`gymnasium library `. + to the :gymnasium:`gymnasium library `. Modified cost: .. math::