SCOPE-RL: A Python Library for Offline Reinforcement Learning and Off-Policy Evaluation
Haruka Kiyohara, Ren Kishimoto, Kosuke Kawakami, Ken Kobayashi, Kazuhide Nakata, Yuta Saito
TL;DR
SCOPE-RL addresses the practical need for an end-to-end platform that combines offline RL and off-policy evaluation, with particular emphasis on robust OPE modules. It integrates a comprehensive suite of OPE estimators, including cumulative distribution OPE (CD-OPE), and implements risk-aware evaluation-of-OPE metrics to inform policy deployment decisions. The library supports end-to-end workflows from data collection to offline policy learning, OPE, and OPS, with broad compatibility for Gym/Gymnasium and d3rlpy, plus visualization and documentation to aid researchers and practitioners. This work enables more reliable policy evaluation and safer, more efficient downstream policy selection, offering a flexible benchmarking environment for offline RL and OPE research. The authors also outline future directions to extend CD-OPE, partially observable settings, and automated estimator selection, signaling ongoing development and community engagement.
Abstract
This paper introduces SCOPE-RL, a comprehensive open-source Python software designed for offline reinforcement learning (offline RL), off-policy evaluation (OPE), and selection (OPS). Unlike most existing libraries that focus solely on either policy learning or evaluation, SCOPE-RL seamlessly integrates these two key aspects, facilitating flexible and complete implementations of both offline RL and OPE processes. SCOPE-RL put particular emphasis on its OPE modules, offering a range of OPE estimators and robust evaluation-of-OPE protocols. This approach enables more in-depth and reliable OPE compared to other packages. For instance, SCOPE-RL enhances OPE by estimating the entire reward distribution under a policy rather than its mere point-wise expected value. Additionally, SCOPE-RL provides a more thorough evaluation-of-OPE by presenting the risk-return tradeoff in OPE results, extending beyond mere accuracy evaluations in existing OPE literature. SCOPE-RL is designed with user accessibility in mind. Its user-friendly APIs, comprehensive documentation, and a variety of easy-to-follow examples assist researchers and practitioners in efficiently implementing and experimenting with various offline RL methods and OPE estimators, tailored to their specific problem contexts. The documentation of SCOPE-RL is available at https://scope-rl.readthedocs.io/en/latest/.
