mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-07-29 20:14:17 +00:00
[ci skip] Simplify quickstart example
This commit is contained in:
parent
b02afd6ee3
commit
b1794ebc52
3 changed files with 2 additions and 5 deletions
|
|
@ -116,7 +116,6 @@ Here is a quick example of how to train and run PPO on a cartpole environment:
|
|||
import gym
|
||||
|
||||
from stable_baselines3 import PPO
|
||||
from stable_baselines3.ppo import MlpPolicy
|
||||
|
||||
env = gym.make('CartPole-v1')
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,10 @@ Here is a quick example of how to train and run A2C on a CartPole environment:
|
|||
import gym
|
||||
|
||||
from stable_baselines3 import A2C
|
||||
from stable_baselines3.a2c import MlpPolicy
|
||||
|
||||
env = gym.make('CartPole-v1')
|
||||
|
||||
model = A2C(MlpPolicy, env, verbose=1)
|
||||
model = A2C('MlpPolicy', env, verbose=1)
|
||||
model.learn(total_timesteps=10000)
|
||||
|
||||
obs = env.reset()
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -40,11 +40,10 @@ Here is a quick example of how to train and run PPO on a cartpole environment:
|
|||
import gym
|
||||
|
||||
from stable_baselines3 import PPO
|
||||
from stable_baselines3.ppo import MlpPolicy
|
||||
|
||||
env = gym.make('CartPole-v1')
|
||||
|
||||
model = PPO(MlpPolicy, env, verbose=1)
|
||||
model = PPO('MlpPolicy', env, verbose=1)
|
||||
model.learn(total_timesteps=10000)
|
||||
|
||||
obs = env.reset()
|
||||
|
|
|
|||
Loading…
Reference in a new issue