Reinforcement learning — practicals
Practicals of the reinforcement-learning course, Master MIND (Sorbonne Université). Each one is a notebook to fill in, in two variants: Notebook is the file to run locally, and Colab the same notebook with a first cell that installs the (pinned) dependencies — download it, then upload it to Google Colab.
To work locally, install uv, and then run
git clone https://git.isir.upmc.fr/mlia/master-mind-rl.gitThis will create a
master-mind-rl directory. If for some reasons we
update the dependencies, you can do latter a
git pullto update the files without touching your notebooks.
Then download the notebooks you need from the table below into that
directory and open them with uv run jupyter lab. The
environment does not change from one practical to the next, so this is done
once; a notebook fixed during the session is one file to download again.
The notebooks build on rl-mind,
a small library installed with the other dependencies: its
documentation (a guide, and
the reference of every class and method) is online. The archive's
README.md also covers tensorboard.
Download
- The environment (a uv project)tp-rl-uv.zip · 111 kB
Practicals
| # | Practical | Description | Files |
|---|---|---|---|
| 01 | Dynamic programming | Value iteration and policy iteration, in a maze | Notebook Colab |
| 02 | Tabular reinforcement learning | TD learning, Q-learning and SARSA; ε-greedy and softmax exploration | Notebook Colab |
| 03-1 | DQN, the bare algorithm | Deep Q-learning with neither replay buffer nor target network | Notebook Colab |
| 03-2 | DQN, complete | A replay buffer, a target network, and the step to Double-DQN | Notebook Colab |
| 04 | DDPG and TD3 | A deterministic actor for continuous actions, then its twin-critic successor | Notebook Colab |
| 05 | REINFORCE | The policy gradient and its variants: discounted rewards, learned baselines | Notebook Colab |
| 06-1 | A2C, discrete actions | A simple advantage actor-critic | Notebook Colab |
| 06-2 | A2C, continuous actions | Gaussian policies and Generalized Advantage Estimation | Notebook Colab |
| 07-1 | PPO with a KL penalty | Staying close to the old policy by penalising the KL divergence | Notebook Colab |
| 07-2 | PPO, clipped | The clipped surrogate objective, on discrete actions | Notebook Colab |
| 07-3 | PPO, clipped, continuous actions | The same algorithm with a Gaussian policy | Notebook Colab |
| 08 | Soft Actor-Critic | Maximum-entropy off-policy learning: TD3 plus an entropy bonus | Notebook Colab |
| 09 | Truncated Quantile Critics | Distributional critics for SAC: quantiles, with the optimistic tail dropped | Notebook Colab |
| 10 | Cross-Entropy Method | A black-box optimizer: a population of policies, no gradient and no critic | Notebook Colab |
| 11 | Guiding TD3 on a deceptive reward | MountainCar: tutor instructions and behavioural cloning where TD3 fails alone | Notebook Colab |
| 12 | Q-learning | A Q-table updated by temporal differences, on the MazeMDP environment | Notebook Colab |
| 13 | Imitation learning: BC and GAIL | Learning from demonstrations, without the environment's reward | Notebook Colab |
| 14 | Tuning a tabular actor-critic (2024) | Grid search, Bayesian optimization with optuna, and a statistical test | Notebook Colab |
| 14 | Tabular actor-critic: the critic update rules (2025) | V or Q critics, uniform against on-policy sampling: what is off-policy? | Notebook Colab |
| 15 | Partial observability: Swimmer | The same temporal-extension wrappers, on a MuJoCo task | Notebook Colab |
| 15 | Partial observability: LunarLander | Wrappers that hide a feature, then extend the agent in time | Notebook Colab |
| A01 | Environments, actors and collectors | The infrastructure of the course, and a first tabular Q-learning agent | Notebook Colab |
| A02 | SuperTuxKart: observations and actions | Exploring what the pystk2 environments show the agent, and what it can do | Notebook Colab |