Skip to content

The current repository contains Jupytre-notebook implementations of different Reinforcement Learning algorithms from the well-known Introduction to Reinforcement Learning book by Sutton & Barto, and algorithms from iconic papers in the field.

Notifications You must be signed in to change notification settings

RoyElkabetz/rl_algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rl algorithms

This repository contains Jupyter notebooks of different Reinforcement Learning (RL) algorithms implementations. Each notebook implements a single RL algorithm in a self-contained and complete manner.

Docker:

In order to use Docker you should first build the image by running the following Shell command in the repository directory.

docker build -t rl_alg:latest .

Then, run the following command to create a container out of that image, connect it to port 8888 (the Jupyter port), and bind the notebooks directory in the container to the notebooks directory on the host (on your machine).

docker run -d -p 8888:8888 -v ./notebooks:app/notebooks rl_alg

Finally, open a browser on your local machine and go to

localhost:8888

and enter in the Jupyter password the word admin. A Jupyter-Lab interface should open with a locally mounted notebooks directory in it.

List of implemented algorithms:

List of Notebooks

Name Description Link Colab NBViewer
REINFORCE.ipynb Implementation of the REINFORCE and REINFORCE with baseline algorithms using PyTorch and Gymnasium on the LunarLander-v2 environment notebook Open In Collab nbviewer
REINFORCE_continuous.ipynb Implementation of the REINFORCE and REINFORCE with baseline algorithms for environments with continuous action spaces using PyTorch and Gymnasium on the LunarLander-v2 continuous environment notebook Open In Collab nbviewer
Actor_Critic_TD_0.ipynb Implementation of the Actor-Critic TD(0) algorithm for environments with discrete and continuous action spaces using PyTorch and Gymnasium on the LunarLander-v2 environment notebook Open In Collab nbviewer
SARSA.ipynb Implementation of the SARSA algorithm with and without an Experience Replay Buffer using PyTorch and Gymnasium on the CartPole-v1 environment notebook Open In Collab nbviewer
Q-Learning.ipynb Implementation of the Q-Learning algorithm with and without an Experience Replay Buffer using PyTorch and Gymnasium on the Acrobot-v1 environment notebook Open In Collab nbviewer
Expected_SARSA.ipynb Implementation of the Expected-SARSA algorithm using PyTorch and Gymnasium on the Acrobot-v1 environment notebook Open In Collab nbviewer
Double_Q-Learning.ipynb Implementation of the Double Q-Learning vs. Q-Learning algorithms using PyTorch and Gymnasium on the Acrobot-v1 environment notebook Open In Collab nbviewer
SARSA_n_step_tabular.ipynb Implementation of the n-steps SARSA algorithm in its tabular version using Gymnasium on the CliffWalking-v0 environment notebook Open In Collab nbviewer
SARSA_n_step.ipynb Implementation of the n-steps SARSA algorithm in its non-tabular version using PyTorch and Gymnasium on the CartPole-v1 environment notebook Open In Collab nbviewer
Off_policy_Expected_SARSA_n_step.ipynb Implementation of the Off-policy n-steps Expected-SARSA algorithm in its non-tabular version using PyTorch and Gymnasium on the CartPole-v1 environment notebook Open In Collab nbviewer
SARSA_lambda.ipynb Implementations of the SARSA(λ) algorithm in its tabular and deep cases, with and without an Experience Replay Buffer using PyTorch and Gymnasium on the CliffWalking-v0 and CartPole-v1 environments notebook Open In Collab nbviewer

About

The current repository contains Jupytre-notebook implementations of different Reinforcement Learning algorithms from the well-known Introduction to Reinforcement Learning book by Sutton & Barto, and algorithms from iconic papers in the field.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published