Skip to content

Implementations of 3 Deep Q-Learning algorithms. These algorithms are utilized by agents that are able to learn playing various Atari games.

Notifications You must be signed in to change notification settings

ItsTSV/DeepReinforcementLearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Reinforcement Learning -- Revisit

I decided to revisit this repo, which contained my Bachelor's work, and do some cleaning up and refactoring. The previous code was quite ugly and often broke style conventions and rules, so I decided to fix that, add some documentation and remove unnecessary abstraction. It ain't perfect now, but it's much, much better than before ;)

What does this repository contain?

This repository contains implementations of 3 Deep Reinforcement Learning algorithms:

  • Deep Q-Learning
  • Double Deep Q-Learning
  • Dueling Deep Q-Learning with Prioritized Memory

And some other utilities, such as a logger, game testing environment, argument parser etc.

The implementations are based on the original papers and the code is written in PyTorch. The algorithms are tested using the Atari gymnasium environment. All the outputs are in the paper -- and also, without the usual theoretical stuff -- in the FinalData folder.

How to run the code?

Simply by executing the main file ;) The arguments are already set to reasonable values; however, you can change them by passing them as parameters to the program. All the arguments are listed in the Utils/arg_handler.py file.

Dependencies

The project was developed, used and tested with Python 3.10 and PyTorch 2.1.1+cu121 (the CUDA version). The other dependencies are:

  • gymnasium
  • numpy
  • argparse
  • dataclasses
  • pandas
  • matplotlib
  • seaborn
  • colorama

Finally, the not so boring stuff

Here are some examples of agents learning to crush the Atari games (Boxing -- left guy, Pong -- right platform):

Boxing Pong

I wanted to train some more, but then the electricity bill came!

About

Implementations of 3 Deep Q-Learning algorithms. These algorithms are utilized by agents that are able to learn playing various Atari games.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages