mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-17 08:56:08 +00:00
Fix example in README.md (#1830)
* Fix example in README.md * Update changelog --------- Co-authored-by: Antonin Raffin <antonin.raffin@ensta.org>
This commit is contained in:
parent
620e58e61f
commit
beee4279eb
3 changed files with 4 additions and 2 deletions
|
|
@ -127,7 +127,7 @@ import gymnasium as gym
|
||||||
|
|
||||||
from stable_baselines3 import PPO
|
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 = PPO("MlpPolicy", env, verbose=1)
|
||||||
model.learn(total_timesteps=10_000)
|
model.learn(total_timesteps=10_000)
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ Documentation:
|
||||||
- Updated callback code example
|
- Updated callback code example
|
||||||
- Updated export to ONNX documentation, it is now much simpler to export SB3 models with newer ONNX Opset!
|
- 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 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)
|
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
|
@anand-bala @hughperkins @sidney-tio @AlexPasqua @dominicgkerr @Akhilez @Rocamonde @tobirohrer @ZikangXiong @ReHoss
|
||||||
@DavyMorgan @luizapozzobon @Bonifatius94 @theSquaredError @harveybellini @DavyMorgan @FieteO @jonasreiher @npit @WeberSamuel @troiganto
|
@DavyMorgan @luizapozzobon @Bonifatius94 @theSquaredError @harveybellini @DavyMorgan @FieteO @jonasreiher @npit @WeberSamuel @troiganto
|
||||||
@lutogniew @lbergmann1 @lukashass @BertrandDecoster @pseudo-rnd-thoughts @stefanbschneider @kyle-he @PatrickHelm @corentinlger
|
@lutogniew @lbergmann1 @lukashass @BertrandDecoster @pseudo-rnd-thoughts @stefanbschneider @kyle-he @PatrickHelm @corentinlger
|
||||||
|
@marekm4
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -43,7 +43,7 @@ import gymnasium
|
||||||
|
|
||||||
from stable_baselines3 import PPO
|
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 = PPO("MlpPolicy", env, verbose=1)
|
||||||
model.learn(total_timesteps=10_000)
|
model.learn(total_timesteps=10_000)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue