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)