Skip to content

Latest commit

 

History

History

Genetic_algorithm(GA)

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

遗传算法Genetic algorithms(GA)

What:

In computer science and operations research, a genetic algorithm (GA) is a metaheuristic inspired by the process of natural selection that belongs to the larger class of evolutionary algorithms (EA). Genetic algorithms are commonly used to generate high-quality solutions to optimization and search problems by relying on biologically inspired operators such as mutation, crossover and selection.

Why:

Advantages of GA:

  1. No need for derivative information
  2. Faster and more efficient than traditional methods
  3. Good parallel capabilities
  4. Deliver a list of good solutions instead of just one
  5. Optimize continuous as well as discrete functions and multi-objective problems
  6. Always deliver a solution and improves that with time
  7. Useful for very large search spaces with many parameters involved

Disadvantages of GA:

  1. Not suitable for simple problems with available derivative information
  2. Stochastic; no guarantee of the result solution being optimal
  3. Frequent calculation of fitness value is computationally expensive for some problems
  4. No guarantee of convergence to the optimal solution if not implemented properly

How:

Please refer to these two websites if you would like to know how to implement the algorithm:
https://github.com/ahmedfgad/GeneticAlgorithmPython
https://github.com/yanshengjia/artificial-intelligence/tree/master/genetic-algorithm-for-functional-maximum-problem

References:

https://en.wikipedia.org/wiki/Genetic_algorithm
https://towardsdatascience.com/genetic-algorithm-implementation-in-python-5ab67bb124a6
https://medium.com/@rinu.gour123/python-genetic-algorithms-with-artificial-intelligence-b8d0c7db60ac