diff --git a/docs/quickstart.md b/docs/quickstart.md index 3a7220e3c..7c706dfb1 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -46,6 +46,19 @@ environments/racetrack The {ref}`observations `, {ref}`actions `, {ref}`dynamics ` and {ref}`rewards ` of an environment are parametrized by a configuration, defined as a {py:attr}`~highway_env.envs.common.abstract.AbstractEnv.config` dictionary. + +For example, the number of lanes can be changed with: + + +```{eval-rst} +.. jupyter-execute:: + + env = gymnasium.make( + "highway-v0", + config={"lanes_count": 2} + ) +``` + After environment creation, the configuration can be accessed using the {py:attr}`~highway_env.envs.common.abstract.AbstractEnv.config` attribute. @@ -54,32 +67,21 @@ After environment creation, the configuration can be accessed using the import pprint - env = gymnasium.make("highway-v0", render_mode='rgb_array') pprint.pprint(env.unwrapped.config) ``` -For example, the number of lanes can be changed with: +The config can also be changed after creation + ```{eval-rst} .. jupyter-execute:: - + env = gymnasium.make("highway-v0", render_mode='rgb_array') env.unwrapped.config["lanes_count"] = 2 env.reset() plt.imshow(env.render()) plt.show() ``` -or directly at creation time with: - -```{eval-rst} -.. jupyter-execute:: - - env = gymnasium.make( - "highway-v0", - render_mode='rgb_array', - config={"lanes_count": 2} - ) -``` ```{note} The environment must be {py:meth}`~highway_env.envs.common.abstract.AbstractEnv.reset` for the change of configuration