Stable Baselines

Stable Baselines

โ˜… 3.8 ๐Ÿ”– 1200 saves ๐Ÿ’ฐ Free GitHub

Stable Baselines is a set of high-quality implementations of reinforcement learning algorithms in Python. A fork of OpenAI’s Baselines codebase, it cleaned up, documented and unified the algorithms behind a single consistent interface, becoming the reference RL toolbox for a generation of researchers and engineers. The project has about 4,300 stars on GitHub.

Overview

Where the original OpenAI Baselines mixed research code of varying quality, Stable Baselines rewrote the algorithms with shared structure, proper documentation, unit tests and a scikit-learn-like API: create an environment, pick an algorithm, call learn(). It ships implementations of A2C, ACKTR, DDPG, DQN, GAIL, HER, PPO, SAC, TD3 and TRPO, built on TensorFlow, with support for vectorized environments, action-space noise, callback hooks and TensorBoard logging. Pretrained agents and benchmark results are included so you can compare algorithms fairly before training your own. The repository was last updated in 2022: active development has moved to its PyTorch successor, Stable Baselines3, but this original codebase remains widely used in teaching, reproductions of published results and legacy projects that depend on its exact implementations.

The library’s longevity owes much to its educational value: because each algorithm follows the same structure, readers can diff two implementations to see exactly what an improvement changes, and the accompanying documentation explains the papers behind the code. It also integrates with the OpenAI Gym interface that became the standard for RL environments, so thousands of existing environments, tutorials and course assignments work with it unchanged โ€” a big reason it is still installed and cited long after active development moved on.

Key Features

  • Unified, documented implementations of 10 classic RL algorithms
  • Consistent API across algorithms โ€” swap PPO for SAC in one line
  • Fork of OpenAI Baselines with tests, docs and cleaner code
  • Vectorized environments and TensorBoard logging built in
  • Pretrained agents and published benchmark comparisons
  • Callback system for checkpointing and custom training logic

๐Ÿ’ณ Pricing

Stable Baselines is completely free and open source under the MIT license.

Who Is It For

Stable Baselines is for students, researchers and engineers learning or prototyping reinforcement learning who want trustworthy reference implementations; new projects should also evaluate its PyTorch successor, Stable Baselines3.

๐Ÿš€ Visit Stable Baselines Official Site

๐Ÿšฉ Report an issue