genetic-algorithm-in-python

The aim of this problem is to obtain the maximum value of an equation with input values ranging from 0-100.

Genetic Algorithm is used to determine the maximum value of an equation.

Example:

The y=target is to maximize this equation ASAP:

y = w1x1+w2x2+w3x3+w4x4+w5x5+6wx6

where (x1,x2,x3,x4,x5,x6)=(4,-2,3.5,5,-11,-4.7)

What are the best values for the 6 weights w1 to w6?

We are going to use the genetic algorithm for the best possible values after a number of generations.

References: https://towardsdatascience.com/genetic-algorithm-implementation-in-python-5ab67bb124a6