RL-Lib is a collection of RL implementations such as algos, helper functions, and more. The purpose of this parent repo is to collect and organize reinforcement learning agents and methods I implement from scratch as self-interest projects or for flexible usage in other projects. While foundational methods and algorithms are the primary focus of this repo (ex: DQN, PPO, A2C/A3C (soon)), I intend to implement any interesting algorithm or method I come across as an understanding exercise. Feel free to use this repo for inspiration, self-projects, or anything else that comes to mind.
The general requirements for algorithms in this repo are as follows:
- PyTorch (for network creation, training, etc.)
- Gymnasium (for RL environments)
- PyGame (for environment visualization)
- Box2D (for environment visualization)
This repo uses uv for managing dependencies.
For ease of use and compatibility testing, scripts are provided in ./algos/scripts for each algorithm to run its main file. Each script has the title format run_<algorithm_name>.sh. If a script isn't provided, navigate to the algorithm's folder in ./algos to find more information on running it via the README.
# ex: running DQN, from the root of this repo
uv run algos/scripts/run_dqn.sh
If you run into issues regarding no module named 'algos', try running the following command:
export PYTHONPATH=$PYTHONPATH:$(pwd)
from the root of this repo.