To tun the file, just run agent.py
It uses pytorch to create the model by learning how to play the classic snake game. At first, it generates random moves then slowly learns. It also shows the progress with the number of games played in a matplotlib window