Last active
September 18, 2018 09:29
-
-
Save araffin/e4f44d1944e7c4f0e3afd12cca35cee7 to your computer and use it in GitHub Desktop.
Train a RL agent in one line of code!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from stable_baselines import PPO2 | |
# Define and train a model in one line of code ! | |
trained_model = PPO2('MlpPolicy', 'CartPole-v1').learn(total_timesteps=10000) | |
# you can then access the gym env using trained_model.get_env() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment