Using the genetic algorithm and neural networks I trained up 5 snakes who will then fuse to become the ultimate snake, this is how I did it
The program I used to write and run this code was processing https://processing.org/download/
If you get it working some instructions press Space to just show the current best from each population press d to double the mutation rate press h to halve it after you run it some snakes will be saved press 0 to 4 to check them out to further train the snakes of legend (the saved snakes) press L to fuse snakes together to create a super snake press f
I hope my commenting makes sense
Have fun :)
Download and Install Processing 3: https://processing.org/download/
If you have git installed, type the following into your terminal:
git clone https://github.com/Code-Bullet/SnakeFusion.git
Else, download the zip file and unpack by clicking the green "Clone and download" button on the top right of the screen.
- Open the Processing application
- Click
File > Open
- Go to where you downloaded the files for this repository, the folder should be called
SmartSnakesCombine
- Inside the
SmartSnakesCombine
folder click on the file calledSnake.pde
- You should now see
Snake.pde
as well as the rest of the files opened up in the Processing application - Press the Run button or click
Sketch > Run
Space
- Show the current best from each population
D
- Double the mutation rate
H
- Half the mutation rate
0 to 4
- Look at the saved snakes
L
- Further train the saved snakes
F
- Fuse snakes together to create a super snake