/SnakeFusion

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

Primary LanguageProcessing

SnakeFusion

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 :)

Initial Setup

Download and Install Processing 3: https://processing.org/download/

Clone This Repository

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 Project Files

  1. Open the Processing application
  2. Click File > Open
  3. Go to where you downloaded the files for this repository, the folder should be called SmartSnakesCombine
  4. Inside the SmartSnakesCombine folder click on the file called Snake.pde
  5. You should now see Snake.pde as well as the rest of the files opened up in the Processing application
  6. Press the Run button or click Sketch > Run

Controls

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