Skip to content

qpc001/Deep-Reinforcement-Learning-Algorithms-with-PyTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementations of Deep Reinforcement Learning Algorithms

This repository contains PyTorch implementations of deep reinforcement learning algorithms.

Algorithms Implemented (so far)

  1. Deep Q Learning
  2. Deep Q Learning with Fixed Q Targets
  3. Double Deep Q Learning
  4. Double Deep Q Learning with Prioritised Experience Replay
  5. REINFORCE
  6. Hill Climbing
  7. Genetic Evolution

I plan to include PPO, DDPG and A2C soon.

Usage

The algorithms are found in the Agent folder. To use the algorithms directly you first create an Environment class that extends the Base_Environment class found in the Environments folder.

To watch all the different agents learn cartpole follow these steps:


git clone https://github.com/p-christ/Deep_RL_Implementations.git
cd Deep_RL_Implementations

conda create --name myenvname
y
conda activate myenvname

pip3 install -r requirements.txt
cd Results/Cart_Pole
python Results.py

Results

Because results can vary greatly each run, each agent plays the game 10 times and we show the median result. We show the results in terms of number of episodes taken to reach the required score and also time taken. The algorithms were run on a 2017 Macbook Pro (no GPUs were used).

1. Cart Pole

Below shows the number of episodes taken and also time taken for each algorithm to achieve the solution score for the game Cart Pole. The hyperparameters used are shown in the file Results/Cart_Pole/Results.py.

Cart Pole Results

About

PyTorch implementations of deep reinforcement learning algorithms and environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%