Darwin’s Snake is a Snake AI that learns to play using neuroevolution. A neural network controls the snake, and a genetic algorithm evolves the parameters over generations.
To make the basic Snake Game with pygame.
Darwin’s Snake is a Snake AI that learns to play using neuroevolution. A neural network controls the snake, and a genetic algorithm evolves the parameters over generations.
To make the basic Snake Game with pygame.
lowk completely forgot abt devlogs :(
i mostly focused on trying to make it last even longer and not suicide
i made sure the old networks could still be run if u wanted to
Log in to leave a comment
v5, v6
training now happens without game window and each generation is done on multiple threads in parallel
this is a lot faster, so i went from 2k generations to 20k
i also used a better crossover algorithm instead of just splitting the genome in half and combining halves
now it avoids suicide by taking wider paths to foods
it does this regardless of its length because that is not an input yet
unfortunately in the example video below, it gets stuck in a loop
Log in to leave a comment
neuroevolution to learn snake
i did 4 different training strategies with v4 being the latest and greatest
right now it ends up always dying by running into itself
Log in to leave a comment