Skip to content

sourcecode369/deep-reinforcement-learning

Repository files navigation

Deep Reinforcement Learning

For the unfamiliar: Reinforcement learning (RL) is a machine learning approach for teaching agents how to solve tasks by trial and error. Deep RL refers to the combination of RL with deep learning.

Trained Agents

Table of Contents

Implementations

The notebooks helps through implementing various algorithms in reinforcement learning. All of the codes are in PyTorch (v0.4) or TensorFlow(v1.7) and Python 3.

  • Dynamic Programming: Dynamic Programming algorithms such as Policy Evaluation, Policy Improvement, Policy Iteration, and Value Iteration.

    • Frozen Lake - v0
  • Monte Carlo: Monte Carlo methods for prediction and control.

    • BlackJack-v0
  • Temporal Difference: Temporal Difference Methods such as Q-learning, SARSA and Expected SARSA.

    • CliffWalking - v0

    • Taxi - v2

  • Deep Q-Learning: Deep Q-Learning agents which use Fixed Q-Targets and Experience Replay for memory including improvements to Deep Q-Learning with state of the art Double DQN, Prioritized Experience Replay, Dueling DQN and Rainbow on range of various environmnts and using various deep learning libraries.

    • CartPole-v1 in TensorFlow.Keras

    • MountainCar-v0 in TensorFlow.Keras

    • LunarLander-v0 in PyTorch

    • Atari Pong in TensorFlow.Keras

    • Atari Breakout in TensorFlow.Keras

    • Self-Driving Car in PyTorch

Labs / Projects

The labs and projects can be found below. All of the projects use simulation environments from Unity ML-Agents. They are btter documented and requires good knowledge of the implemented algorithms to completely understand re-build.

Resources

Dependencies

To set up the python environment to run the code in this repository, follow the instructions below.

  1. Create (and activate) a new environment with Python 3.6.

    • Linux or Mac:
    conda create --name drlnd python=3.6
    source activate drlnd
    • Windows:
    conda create --name drlnd python=3.6 
    activate drlnd
  2. Follow the instructions in this repository to perform a minimal install of OpenAI gym.

    • Next, install the classic control environment group by following the instructions here.
    • Then, install the box2d environment group by following the instructions here.
  3. Clone the repository (if you haven't already!), and navigate to the python/ folder. Then, install several dependencies.

git clone https://github.com/udacity/deep-reinforcement-learning.git
cd deep-reinforcement-learning/python
pip install .
  1. Create an IPython kernel for the drlnd environment.
python -m ipykernel install --user --name drlnd --display-name "drlnd"
  1. Before running code in a notebook, change the kernel to match the drlnd environment by using the drop-down Kernel menu.

Kernel

Credits