Code to find maxima of a function using ga
Objective: Genetic algorithm is a process which is based on the natural selection of random things to determine the fittest. In other words it uses Darwin theory to optimize the results. It involves three stages Selection: In this stage, the best parents from 1st generation are retained for next stage. Crossover: The parents from…