stable-baselines3

PyTorch version of Stable Baselines, reliable implementations of reinforcement learning algorithms.

What is stable-baselines3?

PyTorch version of Stable Baselines, reliable implementations of reinforcement learning algorithms.

Overview of stable-baselines3

What it is

Stable Baselines3 (SB3) is a set of reliable implementations of reinforcement learning algorithms in PyTorch. It is the next major version of Stable Baselines. The library assumes the user has some knowledge about Reinforcement Learning. It is designed to make it easier for the research community and industry to replicate, refine, and identify new ideas, and to create good baselines for projects.

Key features

  • State of the art RL methods implemented - Common interface for all algorithms - Support for custom environments and custom policies - Dict observation space support - Tensorboard support for monitoring training - High code coverage and type hints - Integration with Weights & Biases and Hugging Face

Use cases

  • Research: replicating and comparing RL algorithms - Industry: building projects on top of reliable baselines - Education: allowing beginners to experiment with advanced RL tools without implementation details

Getting started

Install via pip: sh pip install 'stable-baselines3[extra]' Or without extras: sh pip install stable-baselines3 Example training PPO on CartPole: python import gymnasium as gym from stable_baselines3 import PPO env = gym.make('CartPole-v1', render_mode='human') model = PPO('MlpPolicy', env, verbose=1) model.learn(total_timesteps=10_000)

License and pricing

The project is open source under the MIT license.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/dlr-rmstable-baselines3.svg)](https://yunodb.com/tools/dlr-rmstable-baselines3?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/dlr-rmstable-baselines3?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/dlr-rmstable-baselines3.svg" alt="Featured on YunoDB" height="20"></a>