The game of pong made to train a bot.
The current attempt fails to learn using (Double) Deep Q-Learning Network.
If you know why it does not work - I would be very grateful for letting me know!
sudo apt install g++
You may use Kitware APT Repository.
Unzip the PyTorch package. Select Stable (1.4) version, LibTorch package for C++/Java
In external
directory, make symbolic link to LibTorch:
cd pong-ml/external
ln -s <path to LibTorch> libtorch-linux
ln -s <path to LibTorch with CUDA support> libtorch-cuda-linux
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libglew-dev
sudo apt install libglew-dev
git clone https://github.com/Isameru/pong-ml.git
cd pong-ml
mkdir _out
cd _out
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j`nproc`
pong-ml/pong-ml # To start the game
If you have the machine capable with strong graphics card and would like to take advantage of GPGPU, install NVIDIA CUDA Toolkit 10.2 and NVIDIA cuDNN v7.6.5.
CMake should detect the precesence of this toolkit and build the game using CUDA-enabled version of LibTorch. If you experience issues, hack the CMakeLists.txt
to satisfy cmake, compilation, linking, and run-time errors.