Skip to content

Simple single file implementation of Deep Reinforcement Learning algorithms

License

Notifications You must be signed in to change notification settings

vcharraut/rl-basics

Repository files navigation

rl-basics

License: MIT Code style: black Imports: isort CodeFactor

This repository aims to implement various popular RL algorithms and evaluate their performance using the Gymnasium framework.

The goal is to provide a simple and clean implementation of the algorithms, with a focus on readability and reproducibility. Each file is designed to be independent, with code that is well-commented and easy to understand (at least I hope so!). This makes it easy for users to copy and paste the code and use it at their own convenience.

The project is written with Python, Pytorch and Flax. It supports all environments from Gymnasium, including MuJoCo and Atari environments.

This project is greatly inspired by CleanRL. I highly recommend you to check it out if you are looking for a more complete and well documented RL library.

You should be able to find the implementation of the following algorithms:

RL Algorithm Pytorch Flax
DQN discrete - atari discrete - atari
A2C discrete - continuous - atari discrete - continuous - atari
PPO discrete - continuous - atari discrete - continuous - atari
DDPG continuous continuous
TD3 continuous continuous
SAC continuous continuous

Results

LunarLander-v2

lunar-lander

HalfChetaah-v4

half-cheetah