From beee4279eb465a9eb68cebf5664f3ba0e70088fa Mon Sep 17 00:00:00 2001 From: Marek Michalik Date: Tue, 13 Feb 2024 10:47:05 +0100 Subject: [PATCH] Fix example in README.md (#1830) * Fix example in README.md * Update changelog --------- Co-authored-by: Antonin Raffin --- README.md | 2 +- docs/misc/changelog.rst | 2 ++ setup.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4f427087b..6e55f1030 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ import gymnasium as gym from stable_baselines3 import PPO -env = gym.make("CartPole-v1") +env = gym.make("CartPole-v1", render_mode="human") model = PPO("MlpPolicy", env, verbose=1) model.learn(total_timesteps=10_000) diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 4f22c672b..006f156ef 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -61,6 +61,7 @@ Documentation: - Updated callback code example - Updated export to ONNX documentation, it is now much simpler to export SB3 models with newer ONNX Opset! - Added video link to "Practical Tips for Reliable Reinforcement Learning" video +- Added ``render_mode="human"`` in the README example (@marekm4) Release 2.2.1 (2023-11-17) -------------------------- @@ -1561,3 +1562,4 @@ And all the contributors: @anand-bala @hughperkins @sidney-tio @AlexPasqua @dominicgkerr @Akhilez @Rocamonde @tobirohrer @ZikangXiong @ReHoss @DavyMorgan @luizapozzobon @Bonifatius94 @theSquaredError @harveybellini @DavyMorgan @FieteO @jonasreiher @npit @WeberSamuel @troiganto @lutogniew @lbergmann1 @lukashass @BertrandDecoster @pseudo-rnd-thoughts @stefanbschneider @kyle-he @PatrickHelm @corentinlger +@marekm4 diff --git a/setup.py b/setup.py index 5e10ed66c..817fae22a 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ from stable_baselines3 import PPO -env = gymnasium.make("CartPole-v1") +env = gymnasium.make("CartPole-v1", render_mode="human") model = PPO("MlpPolicy", env, verbose=1) model.learn(total_timesteps=10_000)