Deep Q-Network Space Invaders using the Arcade Learning Environment (ALE) and PyTorch via libTorch.
The following papers were used as reference for the implementation:
- Playing Atari with Deep Reinforcement Learning link
- Human-level control through deep reinforcement learning link
The state space consists of frame of the grayscale game screen resized 50% and cropped to 84 x 84.
The ALE Space Invaders Action Space has been reduced from 6 to the following 4 actions.
Value | Meaning |
---|---|
0 | NOOP |
1 | FIRE |
2 | RIGHT |
3 | LEFT |
4 | RIGHT-FIRE |
5 | LEFT-FIRE |
The following software is required for proper operation
Atari ROM space_invaders.bin
was obtained from
Atari Mania
Run the following commands in the root directory of the repository to compile all executables. The base project uses cmake build system with default of make.
cmake ./
make
The primary executable is dqnsi
multi-agent hedonic simulation environment.
The program is implemented using GNU Argp, and has available --help
menu for
information on the arguments that each program accepts, which are required and
are optional.
Credits and thanks for resources referenced and used in this repository, including some code and/or project structure, go to the following:
- DQN 3.0 - Lua/Torch implementation of DQN (Nature, 2015)
- Pytorch-RL-CPP - A Repository with C++ implementations of Reinforcement Learning Algorithms (Pytorch) -
- Atari-DQ PyTorch implementation of DQN, DDQN and Dueling DQN to solve Atari games including PongNoFrameskip-v4, BreakoutNoFrameskip-v4 and BoxingNoFrameskip-v4
- Data Transfer to and from PyTorch - PyTorch and the underlying libtorch is only of use when copying data to it.
- The Essential Guide to Pytorch Loss Functions - In this article, we will go in-depth about the loss functions and their implementation in the PyTorch framework.
- How to initialize deep neural networks? - Xavier and Kaiming initialization