To create an enviroment and install the tools to build our game, you need to install conda. Donwload it from the oficial website
To create an env to run our code, run this on your command lime:
$ conda create -n py_game_env python=3.11
To access it, just run:
$ conda activate py_game_env
To install the dependencies of our game, first make sure you're on the python enviroment that we created on conda
To install pygame lib, run:
$ pip install pygame
This lib we will use for the neural network, pytorch is a great and easy to learn python library.
$ pip install torch torchvision
We will need it later on the code
$ pip install matplotlib ipython
To run the snake game, first make sure you're on the python enviroment that we created previously on conda.
$ python3 snake-game.py