Update the code in Example. (#273)

Replace `Pendulum-v0` with `CartPole-v0`, otherwise the sample code will not run normally.
This commit is contained in:
AptX395 2021-01-04 20:24:38 +08:00 committed by GitHub
parent 944dfdafe4
commit 06498e8be7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -59,6 +59,7 @@ Documentation:
- Added SUMO-RL as example project (@LucasAlegre)
- Fix docstring of classes in atari_wrappers.py which were inside the constructor (@LucasAlegre)
- Added SB3-Contrib page
- Fix bug in the example code of DQN (@AptX395)
Pre-Release 0.10.0 (2020-10-28)
-------------------------------
@ -533,4 +534,4 @@ And all the contributors:
@flodorner @KuKuXia @NeoExtended @PartiallyTyped @mmcenta @richardwu @kinalmehta @rolandgvc @tkelestemur @mloo3
@tirafesi @blurLake @koulakis @joeljosephjin @shwang @rk37 @andyshih12 @RaphaelWag @xicocaio
@diditforlulz273 @liorcohen5 @ManifoldFR @mloo3 @SwamyDev @wmmc88 @megan-klaiber @thisray
@tfederico @hn2 @LucasAlegre
@tfederico @hn2 @LucasAlegre @AptX395

View file

@ -58,7 +58,7 @@ Example
from stable_baselines3 import DQN
from stable_baselines3.dqn import MlpPolicy
env = gym.make('Pendulum-v0')
env = gym.make('CartPole-v0')
model = DQN(MlpPolicy, env, verbose=1)
model.learn(total_timesteps=10000, log_interval=4)