Implementing the well known Snake game with a bit of A.I.
🤖 flavor !
Project pitched and started the 11th november 2020
First expected release the friday 15th november 2020
-
Set your Virtual Environment:
# Download venv librairy apt-get install python3-venv -y # Create your venv py -m venv my_venv # Activate your venv . venv/bin/activate
For more information, go to Python Virtual Environment Official Documentation.
-
Install the project dependencies:
apt install python3-pip pip install numpy pip install PTable
-
Grid
- Pop up Fruits
-
Snake interface
- Move
- Eat
- Grow
-
Rules
- Snake dies when touching it's tail
- Biting his tail cuts him in two
- Can plant a fruit for later by loosing it's tail
-
Player
- Allow Human to play
- Allow AI
- Random
- Myopic vision (Adjacent cells)
- Linear vision
- T shape vision
- Cone shape vision
- 360 linear vision
- Loose points based on cause of death
- Learn from human games
- Allow game replay
-
AI
- Implement a Neural Network
- Input the cells
- Output the directions
- Allow training
- Implement a NN manually
- Save Neural Network configuration and load it
- Show statistics
- Train to win in short periods
- Use a librairy (Pytorch or Tensorflow)
- Use Pytorch
- Implement a Neural Network
-
Population
- Load population
- Run games
- Get best game
- Clone best snake (or the N bests)
- Mutate clones randomly
- Save best configuration
-
Display
- Basic console output
- Animate Wind
- Graphical interface