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 ;)
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.
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.
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
Here are some examples of agents learning to crush the Atari games (Boxing -- left guy, Pong -- right platform):
I wanted to train some more, but then the electricity bill came!

