all-rl-algorithms  by FareedKhan-dev

RL algorithms from scratch, for educational purposes

Created 7 months ago
1,208 stars

Top 32.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides educational, from-scratch Python implementations of 18 Reinforcement Learning (RL) algorithms, targeting students and researchers seeking a deep, intuitive understanding of RL mechanics. It prioritizes code clarity and pedagogical value over performance optimization, serving as an interactive textbook with accompanying Jupyter Notebooks and a comprehensive RL cheat sheet.

How It Works

The project implements RL algorithms using fundamental libraries like NumPy, Matplotlib, and PyTorch, avoiding complex abstractions. Each algorithm is presented in a dedicated Jupyter Notebook, detailing its core logic, mathematical underpinnings, and providing runnable code for experimentation. This approach allows users to directly modify parameters and observe effects, fostering hands-on learning.

Quick Start & Requirements

  • Install: pip install -r requirements.txt after cloning the repository.
  • Prerequisites: Python 3.x, NumPy, Matplotlib, PyTorch.
  • Usage: Run algorithms via Jupyter Notebooks (.ipynb files). A3C implementation requires running a3c_training.py from the terminal.
  • Resources: Virtual environment recommended. Setup time is minimal, dependent on dependency installation.
  • Docs: Repository Link

Highlighted Details

  • Implements 18 RL algorithms including Q-Learning, SARSA, REINFORCE, PPO, DQN, SAC, MADDPG, and PlaNet.
  • Features a comprehensive RL Cheat Sheet summarizing core concepts, algorithms, and hyperparameters.
  • Jupyter Notebooks offer step-by-step explanations and visualizations of learning curves and policies.
  • Code is designed for readability and clarity, closely mirroring mathematical descriptions.

Maintenance & Community

The repository is actively updated, with recent additions including 18 new algorithms and a cheat sheet. Contributions are welcomed via pull requests for bug fixes, improved explanations, or new algorithm implementations. Users can create issues to discuss contributions.

Licensing & Compatibility

The repository's license is not explicitly stated in the provided README. Users should verify licensing for commercial or closed-source integration.

Limitations & Caveats

This repository is primarily for educational purposes and is not performance-optimized. Some implementations, particularly for more complex algorithms, may contain bugs, simplifications, or be incomplete.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
60 stars in the last 30 days

Explore Similar Projects

Starred by Hanlin Tang Hanlin Tang(CTO Neural Networks at Databricks; Cofounder of MosaicML), Amanpreet Singh Amanpreet Singh(Cofounder of Contextual AI), and
2 more.

coach by IntelLabs

0%
2k
Reinforcement learning framework for experimentation (discontinued)
Created 8 years ago
Updated 2 years ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Pawel Garbacki Pawel Garbacki(Cofounder of Fireworks AI), and
6 more.

tianshou by thu-ml

0.1%
9k
PyTorch RL library for algorithm development and application
Created 7 years ago
Updated 6 days ago
Feedback? Help us improve.