This repository contains PyTorch implementations of deep reinforcement learning algorithms.
- Deep Q Learning
- Deep Q Learning with Fixed Q Targets
- Double Deep Q Learning
- Double Deep Q Learning with Prioritised Experience Replay
- REINFORCE
- Hill Climbing
- Genetic Evolution
I plan to include PPO, DDPG and A2C soon.
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
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).
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.