arXiv:2610.41303cs.LGOct 2026

Manuscript Offprint

arXiv:2610.41303

rl_rob: A transparent, from-scratch Python library for teaching reinforcement learning from tabular methods to deep policy gradients

Abdulrahman Altahhan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

rl_rob is an open-source Python library for teaching reinforcement learning. It implements the arc of a modern course, from tabular temporal-difference learning through linear function approximation to deep value-based and policy-gradient methods, with every algorithm written from first principles so that its update rule is visible in a few lines of code. All agents share one interface, so learners can compare methods directly across stages and trace a deep reinforcement learning update from the temporal-difference error to the weight change. The library supports teaching and assessment in which students implement, modify and explain update rules, rather than only produce working code.

Keywords: Reinforcement learning; Machine learning education; Deep reinforcement learning; Python; Jupyter

Code metadata

Nr.Code metadata descriptionMetadata
C1Current code versionv1.0.0
C2Permanent link to code/repository used for this code versionhttps://github.com/AltahhanAi/rl_rob
C3Permanent link to Reproducible CapsuleNot applicable
C4Legal Code LicenseGNU Affero General Public License v3.0 (AGPL-3.0)
C5Code versioning system usedgit
C6Software code languages, tools, and services usedPython; NumPy, Matplotlib, PyTorch, Gymnasium, Jupyter; GitHub Actions; Google Colab
C7Compilation requirements, operating environments and dependenciesPython 3.9 or later on Linux, macOS or Windows, or Google Colab; numpy, matplotlib, ipython, tqdm, gymnasium, minigrid, torch, opencv-python-headless, scikit-learn; optional ROS 2 for the Gazebo robot environment
C8If available, link to developer documentation/manualhttps://github.com/AltahhanAi/rl_rob#readme
C9Support email for questionsA.Altahhan@leeds.ac.uk