Custom environment page modified. Following fixes are committed in response to issue#755. (#758)

* Page modified. Following fixes are committed in response to issue#755.

- fixed the broken url on creating custom gym environment. Also added appropriate advice by citing official OpenAi gym documents.
- SB3 text tweaked.

* modified page

- updated the in-line text hyperlinks to follow Sphinx restructured text format.

* modified page

- updated the in-line text hyperlinks to follow Sphinx restructured text format.
- updated text grammar

* Language

Co-authored-by: Anssi <kaneran21@hotmail.com>
This commit is contained in:
Ashish Dutt 2022-02-05 19:36:36 +08:00 committed by GitHub
parent 78afcbd6d9
commit 954daaac37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@
Using Custom Environments Using Custom Environments
========================== ==========================
To use the rl baselines with custom environments, they just need to follow the *gym* interface. To use the RL baselines with custom environments, they just need to follow the *gym* interface.
That is to say, your environment must implement the following methods (and inherits from OpenAI Gym Class): That is to say, your environment must implement the following methods (and inherits from OpenAI Gym Class):
@ -73,15 +73,11 @@ To check that your environment follows the gym interface, please use:
We have created a `colab notebook <https://colab.research.google.com/github/araffin/rl-tutorial-jnrr19/blob/master/5_custom_gym_env.ipynb>`_ for We have created a `colab notebook <https://colab.research.google.com/github/araffin/rl-tutorial-jnrr19/blob/master/5_custom_gym_env.ipynb>`_ for a concrete example on creating a custom environment along with an example of using it with Stable-Baselines3 interface.
a concrete example of creating a custom environment.
You can also find a `complete guide online <https://github.com/openai/gym/blob/master/docs/creating_environments.md>`_ Alternatively, you may look at OpenAI Gym `built-in environments <https://gym.openai.com/docs/#available-environments>`_. However, the readers are cautioned as per OpenAI Gym `official wiki <https://github.com/openai/gym/wiki/FAQ>`_, its advised not to customize their built-in environments. It is better to copy and create new ones if you need to modify them.
on creating a custom Gym environment.
Optionally, you can also register the environment with gym, that will allow you to create the RL agent in one line (and use ``gym.make()`` to instantiate the env):
Optionally, you can also register the environment with gym,
that will allow you to create the RL agent in one line (and use ``gym.make()`` to instantiate the env):
.. code-block:: python .. code-block:: python