Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Six basic steps of genetic algorithm

Shulou Source: shulou.com Published: 2022-06-02 15:06:24 10月02日 Update

This article mainly introduces the six basic steps of genetic algorithm, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article.

The basic steps of genetic algorithm are: 1, initialization; 2, individual evaluation; 3, selection operation; 4, crossover operation; 5, mutation operation, acting on the mutation operator on the population; 6, termination condition judgment.

The basic steps of genetic algorithm are:

(1) initialization: set the evolution algebra counter tweak 0 and the maximum evolution algebra T, and randomly generate M individuals as the initial population P (0).

(2) individual evaluation: calculate the fitness of each individual in the group P (t).

(3) selection operation: the selection operator is applied to the population. The purpose of selection is to pass on the optimized individuals directly to the next generation or to produce new individuals through pairing crossover and then pass on to the next generation. The selection operation is based on the fitness evaluation of individuals in the group.

(4) crossover operation: the crossover operator is applied to the population. Crossover operator plays a key role in genetic algorithm.

(5) mutation operation: the mutation operator is applied to the population. That is, to change the gene value on some loci of the individual string in the population. After selection, crossover and mutation, the next generation population P (t) is obtained.

(6) termination condition judgment: if tasking T, the individual with the maximum fitness obtained in the process of evolution is taken as the output of the optimal solution, and the calculation is terminated.

Thank you for reading this article carefully. I hope the article "six basic steps of genetic algorithm" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Population individual operation selection algorithm heredity mutation operator crossover step function article next generation fitness evolution maximum algebra gene condition evaluation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Technology Redmi Linux MySQL