Abstract
In the past decade, model-free reinforcement learning (RL) has provided solutions to challenging domains such as robotics. Model-based RL shows the prospect of being more sample-efficient than model-free methods in terms of agent-environment interactions, because the model enables to extrapolate to unseen situations. In the more recent past, model-based methods have shown superior results compared to model-free methods in some challenging domains with non-linear state transitions. At the same time, it has become apparent that RL is not market-ready yet and that many real-world applications are going to require model-based approaches, because model-free methods are too sample-inefficient and show poor performance in early stages of training. This demonstrates the necessity for a toolbox to push the boundaries for model-based RL. Bellman aims to fill this gap and introduces the first thoroughly designed and tested model-based RL toolbox using state-of-the-art software engineering practices. Our modular approach enables to combine a wide range of environment models with generic model-based agent classes that recover state-of-the-art algorithms.
Introduction
Reinforcement Learning (RL) has achieved significant milestones in games and simulations. However, transitioning these successes to real-world industrial applications remains a challenge, primarily due to sample inefficiency. Standard model-free RL (MFRL) algorithms often require millions of interactions with the environment to learn effective policies, a requirement that is frequently cost-prohibitive or unsafe in physical settings like robotics or production lines.
Model-Based RL (MBRL) addresses this by learning a "world model" to predict state transitions and rewards. This allows the agent to plan or "dream" about potential outcomes without direct interaction with the physical environment. Despite its potential, MBRL research has lacked the standardized toolboxes available for MFRL (e.g., Stable Baselines). Bellman is designed to bridge this gap, providing a modular framework built on TensorFlow to standardize MBRL development and evaluation.
Methods and Architecture
Bellman is built as an extension of the TF-Agents library, adhering to rigorous software engineering standards. Its architecture is centered around three primary pillars:
1. Environment Model API
Bellman decomposes the world model into four distinct, pluggable components:
- Initial State Model: Predicts the starting state distribution.
- State Transition Model: Predicts the next state given a current state and action.
- Reward Model: Predicts the reward for a given transition.
- Termination Model: Predicts if a state is terminal.
This modularity allows researchers to swap individual components—for instance, replacing a neural network transition model with a Gaussian Process—without modifying the agent's core logic.
2. Modular Agent Classes
MBRL agents in Bellman are categorized into two functional types:
- Decision-Time Planners: These agents perform planning at every step to select the next action. Examples include PETS (Probabilistic Ensembles with Trajectory Sampling) using Random Shooting or the Cross-Entropy Method.
- Background Planners: These agents use the learned model to generate synthetic data for training a standard model-free agent (e.g., SAC or PPO) "in the background." Examples include MBPO and ME-TRPO.
3. Experiment Harness
The Experiment Harness provides a unified system for systematic evaluation. It ensures that different agents are compared under identical protocols, reward functions, and interaction limits, facilitating fair benchmarking.
The simplicity of the API is a key feature, allowing complex experiments to be defined in just a few lines of code.
Key Insights
- Component-Level Attribution: The modular design enables "ablation studies" on the architecture itself. Researchers can isolate whether performance gains stem from a new planning algorithm or a more accurate transition model.
- Recovering State-of-the-Art: Bellman's base classes are robust enough to re-implement complex algorithms like MBPO and PETS with minimal, clean code.
- Virtual Training Environments: By treating the learned model as a "virtual environment," any model-free algorithm can be transformed into a model-based one by training it on synthetic transitions generated by the Bellman model.
Results and Future Work
Bellman successfully provides a unified platform to compare MBRL implementations against MFRL baselines (such as PPO, SAC, and TD3) using a single experiment protocol. It supports standard robotics benchmarks and is designed for extensibility toward industrially-motivated problems.
Future development aims to increase model diversity, particularly by integrating Gaussian Processes via GPflow for better uncertainty estimation. The team also plans to expand the library to include more specialized MBRL techniques, such as model-based value expansion and intrinsic motivation agents, while moving toward benchmarks that reflect the non-linear complexities of real-world industrial systems.
Source Code: https://github.com/Bellman-devs/bellman/
Summary updated