--- id: sb3-contrib version: "2.9.0" license: MIT license_treatment: permissive maintenance: active --- # sb3-contrib — Contrib package of Stable Baselines3, experimental code. License: permissive · Maintenance: active · Downloads: 439.1K/mo ## What it is and what it does SB3-Contrib is a companion package to stable_baselines3 that houses experimental and newer reinforcement learning algorithms and tools. It maintains the documentation and code style of the main library while hosting implementations that are either too niche, too experimental, or too difficult to integrate into the core package. The package includes algorithms like Augmented Random Search, Quantile Regression DQN, masked PPO variants, recurrent PPO, and Truncated Quantile Critics, along with environment wrappers. The package is designed for researchers and practitioners who want access to cutting-edge RL implementations without waiting for them to mature enough for the main library. It trades stability guarantees for breadth: algorithms here follow consistent documentation and style but may not have the same level of testing or long-term support as core stable_baselines3 methods. Use it for: - Implement action masking in PPO for environments with invalid actions using MaskablePPO - Train agents with recurrent policies using RecurrentPPO for partially observable environments - Experiment with newer algorithms like Truncated Quantile Critics or Trust Region Policy Optimization - Prototype RL solutions with less mature but potentially better-performing algorithms before production deployment - Access environment wrappers like Time Feature Wrapper to augment observation spaces ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides experimental reinforcement learning algorithms and tools that extend stable_baselines3 with newer implementations, including policy gradient variants, Q-learning methods, and environment wrappers. Yes, if you need experimental RL algorithms or specialized policy variants beyond what stable_baselines3 core offers. The low install friction, active maintenance, and MIT license make it a reasonable addition to an RL workflow. The experimental nature of the algorithms means this is best suited for research or prototyping rather than production systems requiring stability guarantees. ## Install pip install sb3-contrib uv add sb3-contrib poetry add sb3-contrib ## Installing sb3-contrib Before you install: Low friction installation as a pure Python wheel. Actively maintained with a recent release and steady commit activity. Requires the master version of stable_baselines3 as a runtime dependency. License in practice: MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations. Quickstart: pip install sb3-contrib from sb3_contrib import MaskablePPO model = MaskablePPO('MlpPolicy', env) Requires stable_baselines3 as a runtime dependency Verify before relying: - Whether the master version of stable_baselines3 requirement creates practical installation friction beyond standard dependency resolution - Performance or stability characteristics of experimental algorithms relative to stable_baselines3 core implementations ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 439.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags reinforcement learning algorithms, experimental RL implementations, PPO LSTM recurrent policy, action masking reinforcement learning, stable baselines extensions, deep reinforcement learning tools, policy optimization algorithms, reinforcement-learning, experimental-algorithms, policy-gradient [View on SkillFed](https://skillfed.io/packages/sb3-contrib) · [View on PyPI](https://pypi.org/project/sb3-contrib/)