RLForge is an open-source reinforcement learning library that makes it easy to experiment with RL algorithms, environments, and training workflows. It is designed to be lightweight, educational, and fully compatible with the Gymnasium ecosystem (formerly OpenAI Gym).
-
Educational algorithms: from simple multi-armed bandits and tabular methods (SARSA, Q-learning, Expected SARSA) to function approximation with linear models and MLPs.
-
Advanced deep RL agents: including DQN, REINFORCE, Actor-Critic, DDPG, TD3, SAC, and PPO (both discrete and continuous).
-
Custom environments — bandits, short corridor, maze variations, robotics-inspired tasks like Mecanum Car, and classic control problems such as Pendulum.
-
Gymnasium compatibility: seamlessly integrate RLForge agents with hundreds of standardized benchmark environments.
-
Visualization tools: built-in experiment runner and plotting utilities for learning curves, episode statistics, and trajectory tracking.
-
PyTorch integration: optional install enables neural-network-based agents:
DQNTorchAgentDDPGAgentTD3AgentSACAgentPPODiscretePPOContinuous
These PyTorch agents also support vectorized environments, allowing parallel training across multiple instances for faster and more stable learning.
If you already have Python installed, you can install RLForge with:
pip install rlforgeThis will download and install the latest stable release of rlforge available in the
Python Package Index.
RLForge works with Python 3.10 or later. Installing with pip will automatically
download all required dependencies if they are not already present.
To enable PyTorch-based agents, install RLForge with the torch extra:
pip install rlforge[torch]Or install all optional dependencies:
pip install rlforge[all]Full documentation, including tutorials and examples, is available on Read the Docs.
Explore the examples section to see RLForge in action, from simple bandit problems to advanced continuous control tasks.
