Welcome to the most hands-on reinforcement learning experience!
This is a short and practical introductory course on foundational and classic deep reinforcement learning algorithms. By the end of the course, you will have written from scratch algorithms like DQN, SAC, PPO, as well as understood at a high-level the theory behind them.
We will be able to train an AI to play Atari games and land on the Moon!
To make sure we can focus on learning, the environment setup is opinionated 😊 Here it is:
-
Install Miniconda
Why conda? Because it's a full environment manager, and we can choose the Python version too. -
Checkout this Git repository, and
cd
into its folder. -
Create and activate the
drlzh
virtual environment:conda create --name drlzh python=3.11 conda activate drlzh
-
Install Poetry and install dependencies:
Dependencies includegymnasium[accept-rom-license]
for Atari. Make sure to accept the license agreement when installing the dependencies of the project via Poetry.pip install poetry poetry install
-
Install Visual Studio Code
Open this repository folder in Visual Studio Code (make sure to keep the .vscode
folder for
settings consistency, running on Jupyter might require some tweaks to code and imports).
Open the first 00_Intro.ipynb
notebook in Visual Studio Code, and follow along! Your objective
is to write code in the TODO
sections and try out the algorithms! You might even encounter some
unit tests to verify your implementation along the way! Keep moving from one notebook to the next,
and if you get stuck feel free to check the /solution
folder where the full code is available.
For an expanded treatment and step-by-step coding, stay tuned for the upcoming YouTube videos!