This project includes the game of Pong running on a Digilent PYNQ-Z1 FPGA board. The player is challenged to play against a bot trained with Deep-Q Reinforcement Learning (DQRL).
The bot AI is trained in Google Colab following the notebook in ai/
folder.
The hardware part was implemented in Vivado High Level Synthesis (HLS) C++. It exploits Xilinx OpenCV libraries for resizing and stream the video frames generated by the game.
For instantiating the HDMI IPs, please follow this guide.
- CMake
- Xilinx Vivado 2018.3
Simulation is working assuming the DLL are copied in bin/
along side the executable.
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
mkdir build
cmake .. -G Ninja
cmake --build . --config Release
mkdir build
cd build
cmake ..
make all
List of possible bugs:
- Having not squared images in games generates distorted images.