Implementation of binary genetic algorithm for function optimization.
Python implementation of binary genetic algorithm with two point crossover and inverse mutation. This was a Genetic Algorithms course project and it's set up to optimize Levy's function number 13 but can optimize any given function. Here is plaint python code, there is also an interactive Colab notebook with explanations (in Serbian).
Three graphics bellow represent average and best chromosome value for every generation. Algorithm runs with 20, 100 and 150 initial chromosomes, 5 times.
20 chromosomes stats 100 chromosomes stats 150 chromosomes