Must Read
RL Basics
glossary refresher for first-time readers
→
Theory & Code
-
Tabular off-policy TD control - a Q-table for small discrete Gym envs like FrozenLake and CliffWalking (Watkins, 1989). The foundation DQN later approximates with a net.
DiscreteOff-policyTabular
→
-
Deep Q-Network - neural network approximates Q(s,a), stabilised with experience replay and a frozen target network (Mnih et al., 2015).
DiscreteOff-policyMLP
→
-
Same loop as DQN, one change in the target - the online net picks the action, the target net scores it, so the max stops flattering itself (van Hasselt et al., 2016).
DiscreteOff-policyMLP
→
-
Splits Q into state value V(s) and advantage A(s,a). Learns which states are inherently good independently of which action matters (Wang et al., 2016).
DiscreteOff-policyMLP
→
-
Notes on optimising the policy directly - gradient ascent on J(θ), why the environment's transition probability falls out of the gradient, and the policy gradient theorem derived two ways.
Discrete + Cont.On-policyStochastic
→
-
Monte Carlo policy gradient - collect full episodes, compute returns, reinforce actions that led to high reward. The original policy gradient method (Williams, 1992).
DiscreteOn-policyMLP · CNN
→
-
Deep Deterministic Policy Gradient - deterministic actor μ(s) outputs actions directly, backpropagating through the critic to improve. Off-policy with Polyak target networks (Lillicrap et al., 2016).
ContinuousOff-policyMLP · CNN
→
-
Twin Delayed DDPG - two critics (take the min), delayed actor updates, and clipped noise on target actions to fix DDPG's overestimation bias (Fujimoto et al., 2018).
ContinuousOff-policyMLP · CNN
→
-
Soft Actor-Critic - maximises reward and policy entropy jointly. Auto-tuned temperature. Robust, exploratory, and the benchmark for off-policy continuous control (Haarnoja et al., 2018).
ContinuousOff-policyMLP · CNN
→
-
Random Network Distillation - prediction error of a fixed random network acts as an intrinsic curiosity reward. High for novel states, low for familiar ones (Burda et al., 2018).
DiscreteIntrinsic RewardMLP · CNN
→
About NeatRL
NeatRL is an open-source Python library implementing reinforcement learning algorithms from first principles in PyTorch. Every file is self-contained and readable - designed to be understood, not just used.
Citation
If you use NeatRL, please cite:
@misc{singh2026neatrl,
title={NeatRL: Readable Single-File Reinforcement Learning Implementations in PyTorch},
author={Yuvraj Singh},
year={2026},
howpublished={\url{https://github.com/YuvrajSingh-mist/NeatRL}},
doi={10.5281/zenodo.23198154},
}
Apache 2.0 (code) · CC BY 4.0 (docs & artifacts) ·
NOTICE ·
CITATION.cff