# Large-Scale Complex Network Community Detection Combined with Local Search and Genetic Algorithm
## 3 Proposed Method
### Genetic Algorithm  
1. Principles of genetic algorithms  
The genetic algorithm is based on the selection of the natural environment and the reproductive, crossover and genetic mutations that occur in the genetic process, simulating the evolutionary process of natural organisms and finding the optimal solution [23]. The genetic algorithm directly encodes the structural object, does not need to derive the index function, and defines the continuity of the mouth function. It can process multiple solutions in the search space together and has a high global search capability. The probabilistic guidance optimization method can autonomously determine the search space and search direction, independent of the determined rules; for those nonlinear, large-scale, no specific analytical or multiple index function optimization problems, compared to other types. The optimization method, the algorithm can get better optimization results.
2. Genetic algorithm flow  
The performance of the genetic algorithm depends largely on the selection of the algorithm control parameters, and the termination condition of the algorithm generally reaches the maximum number of iterations or reaches the specified error range. The specific process of the genetic algorithm is as follows:  
1. Coding: The coding of genetic algorithm is the genetic representation of the solution. It is usually expressed as a numeric string or a string. The solution data x in the solution space is the expression of the genetic algorithm. The binary coding method is the most important kind of coding method in the genetic algorithm.
2. Initialization: randomly generate \(N\) initial binary strings, that is, a total of \(N\) individuals in the initial population, and perform initialization operations on these string structures. The specific problem of the length of the string is specifically analyzed, and the above-mentioned individuals are the initial groups \(P(t)\), form a set of candidate solutions.
3. Individual evaluation: Calculate the fitness of each individual in the group \(P(t)\), and the individuals are sorted according to the size of the fitness value.
4. Selection operation: The selection operator is used for the parent group. The mouth is to directly inspect the selected high-quality individuals to the next generation for recombination and mutation. This also reveals the principle of survival of the fittest in the process of biologic evolution.
5. Crossover operation: also known as recombination, the crossover operator is applied to the group, and two pairs of parent individuals are randomly selected from the population according to a certain crossover probability, and part of the structural data are exchanged to form two new individuals.
6. Mutation operation: The mutation operator is used for the population, and some gene values of the individual are changed according to the small mutation probability, and the mutation operation can maintain the genetic diversity.
7. Iterative termination judgment: If the number of iterations \(t<\) MAXGEN, then let \(t=t+1\) and go back to step (2); if the iteration number \(t=\) MAXGEN, directly output the maximum fitness value, corresponding to its value. The individual is the optimal individual, the optimal solution is output, and the algorithm terminates.