Initialization
Begin with a randomly generated population of possible solutions, with each individual represented as a chromosome.
AI / GENETIC ALGORITHMS
An experiment involving snakes, neural networks, perceptrons and genetic algorithms. The project explores how a population can improve over time through selection, crossover and mutation.
THE PROCESS
A genetic algorithm is a search method inspired by natural selection. It is useful for complex problems where the possible solutions are too numerous to test one by one.
Begin with a randomly generated population of possible solutions, with each individual represented as a chromosome.
Measure the fitness of each individual. Better solutions are more likely to be selected to reproduce.
Combine parts of two selected parents to produce new offspring and carry useful traits into the next generation.
Apply small random changes to introduce diversity and reduce the chance of settling too early on a weak solution.
Replace some or all of the old population with the new offspring to create the next generation.
Repeat the cycle until a solution reaches the target fitness or the algorithm completes its maximum number of generations.
THE RESULT
The best-performing solution found across all generations is returned as the final result.