MindMap Gallery genetic algorithm
This mind map introduces the genetic algorithm in more detail, including its characteristics, application areas, basic processes, several concepts of the genetic algorithm, application steps of the genetic algorithm, specific steps of the genetic algorithm, etc. Friends are welcome to watch and use it.
Edited at 2022-02-11 15:29:48Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
genetic algorithm
Overview
Imitate the principles of biological genetic evolution and continuously improve the adaptability of individuals in the population through operating mechanisms such as selection, crossover, and mutation.
Features
advantage
good parallelism
The operating object is a set of feasible solutions; there are multiple search tracks
Strong versatility
Only the value information of the target is used, without the need for high-value information such as gradients.
Good global optimization and robustness
Good operability
shortcoming
premature convergence problem
The convergence speed is slow and the real-time performance of the algorithm is poor.
Application areas
Function optimization (classic application)
Combinatorial optimization (traveling salesman problem - has become a standard for measuring the quality of algorithms, knapsack problem, bin packing problem, etc.)
production scheduling problem
Automatic control (such as optimization design of aviation control system, optimization design of fuzzy controller and online modification of membership function, optimization design of artificial neural network structure and adjustment of connection weights of artificial neural network, etc.)
Robot intelligent control (such as mobile robot path planning, joint robot motion trajectory planning, robot inverse kinematics solution, etc.)
Image processing and pattern recognition (such as image restoration, image edge feature extraction, geometric shape recognition, etc.)
Machine learning (using GA for knowledge acquisition and building a GA-based machine learning system)
Basic process
Some concepts of genetic algorithm
Individual
Population
Fitness
In genetic algorithms, the fitness function of an individual is generally measured through the fitness function.
Coding
The process of converting the actual feasible solution of a problem to be solved from its solution space to the search space (that is, the individual space) that the genetic algorithm can handle is called encoding.
Decoding
Decoding is the process of converting the chromosomes of the optimal individuals searched by the genetic algorithm into the actual optimal solution to the problem to be solved, that is, the reverse process of encoding.
Selection
According to the fitness of each individual and certain rules, some excellent individuals are selected from the t-th generation population P(t) and passed on to the next-generation population P(t 1). Generally, the selection operation is performed through the selection operator (Selection Operator)
Crossover
The individuals in the population P(t) are randomly paired into pairs, and for each pair of individuals, part of the chromosomes between them are exchanged with a certain probability (called crossover rate) following a certain rule.
Mutation
For each individual in the population P(t), the gene value on one or some loci is changed to other alleles with a certain probability (called mutation probability, Mutation Rate).
Application steps of genetic algorithm
(1) Determine the decision variables and various constraints, that is, determine the individual phenotype X and the solution space of the problem
(2) Establish an optimization model and determine the type of objective function and its mathematical description form or quantification method.
(3) Determine the chromosome encoding method that represents the feasible solution, that is, determine the individual genotype X* and the search space of the genetic algorithm.
Coding is a prerequisite and key step for genetic algorithm to solve problems
① Not only determines the arrangement form of individual genes (thereby determining the way operations such as selection and reproduction work), but also determines the decoding method from the genotype in the search space to the phenotype in the solution space (thereby determining the translation and interpretation of the solution obtained by GA). understand);
②Determine the difficulty and complexity of GA search;
③Determine the accuracy of solving the problem.
Commonly used genetic algorithm encoding methods mainly include: binary encoding, floating point number encoding, etc. It can be proved that binary encoding has stronger search ability than floating point encoding, but floating point encoding can maintain better population diversity in mutation operations than binary encoding.
Standard genetic algorithms mostly use binary coding methods to represent decision variables as binary strings. The length of the binary coding string is determined by the required accuracy. Then the binary coding strings of each decision variable are concatenated together to form a chromosome.
(4) Determine the decoding method, that is, determine the correspondence and conversion method from individual genotype X* to individual phenotype X.
For example: for binary encoding, the decoding process is as follows: If the value range of X* is [Xl, In the formula, [Xl,Xr]——the minimum and maximum values of parameters; L——Parameter encoding length; k——The real value corresponding to the binary string.
(5) The quantitative evaluation method for determining individual fitness is to determine the conversion rule from the objective function value to individual fitness.
There are three commonly used fitness functions of standard genetic algorithms:
Ⅰ. Directly use the objective function to be solved as the fitness function If the objective function is a maximum value problem, then Fit(f(X))=f(X) If the objective function is a minimum value problem, then Fit(f(X))=-f(X)
Advantages: simple and intuitive;
Disadvantages: First, the non-negative requirement may not be met; second, the function value distributions solved for some generations vary greatly, and the average fitness obtained may not be conducive to reflecting the average performance of the population.
Ⅱ. Boundary construction method Cmax is the maximum estimate of f(x). Cmin is the minimum estimate of f(x).
This method is an improvement of the first method, but sometimes there are problems such as difficulty in pre-estimating the limit value or imprecise estimation.
Ⅲ. Reciprocal method C is a conservative estimate of the bounds of the objective function.
(6) Determine the specific operation methods of each genetic
①Selection operator and selection operation
There are two common methods of assigning individual selection probabilities:
B. Rank-based Fitness Assignment In ranking-based fitness assignment, the population is sorted according to the target value. Fitness only depends on the individual's position in the population, not the actual target value. The ranking method shows better robustness than the proportional method, and it can overcome the scale problem and premature convergence problem of proportional fitness calculation to a certain extent.
Several selection methods to improve the performance of genetic algorithms
ⅠSteady State Reproduction: In the iterative process, some high-quality new child individuals are used to update some parent individuals in the group as the next generation population.
ⅡSteady State Reproduction without Duplicates: On the basis of steady-state reproduction, when forming a new population of the next generation, the individuals in it are not repeated.
② Crossover rate and crossover operation
Crossover, also known as genetic recombination, is the most important means for genetic algorithms to obtain new excellent individuals, and determines the global search capability of genetic algorithms.
Generally, when the probability of random generation is greater than the crossover rate, the genetic algorithm will select two individuals according to certain rules and perform the crossover operation. The choice of crossover rate determines the frequency of crossover. A larger crossover rate allows each generation to fully cross, but the possibility of destroying the excellent patterns in the group increases, resulting in a larger generation gap, which makes the search random; The lower the crossover rate, the smaller the generation gap produced, which will cause more individuals to be directly copied to the next generation, and genetic search may stagnate. The generally recommended value range is 0.4~0.9.
For binary coding, commonly used crossover methods include: single-point crossover, multi-point crossover, and uniform crossover. In addition, there are also Partially Matched Crossover, Ordered Crossover, Shuffle Crossover and so on.
③Mutation rate and mutation operation
Mutation itself is a local random search, which enables the genetic algorithm to have local random search capabilities; at the same time, it allows the genetic algorithm to maintain the diversity of the population to prevent premature convergence.
Generally, the mutation operation will be triggered when the probability of random generation is greater than the mutation rate. The mutation rate generally takes 0.001~0.1. The mutation rate cannot be too large. If it is greater than 0.5, the genetic algorithm will degenerate into random search, and some important mathematical characteristics and search capabilities of the genetic algorithm will no longer exist.
Commonly used mutation operation methods include: real-valued mutation method and binary mutation method, etc.
(7) Determine the relevant operating parameters of the genetic algorithm, including population size, number of iterations (generally 100~500), selection operator, crossover rate, mutation rate, etc.
(8) Initialization group
The initial group is generally generated randomly
It is best for the initial value to be uniformly sampled in the solution space (the convergence speed is faster)
For non-binary encodings, also consider whether the generated chromosome is within the feasible region
(9) Calculate the decoded fitness value of individuals in the group
(10) According to the genetic strategy, use the selected selection, crossover and mutation operators to act on the population to generate the next generation population.
(11) Determine whether the group performance meets a certain indicator or completes the predetermined number of iterations. If not, return to (9).
Premature Convergence
(1) Immature convergence phenomenon
The premature convergence phenomenon is a unique phenomenon in genetic algorithms and is very common. It means that when the genetic algorithm has not found the global optimal solution or a satisfactory solution, the group can no longer produce offspring whose performance exceeds that of the parent generation, and the individuals in the group are very similar. An important characteristic of immature convergence is a sharp reduction in the diversity of individual structures in the group.
(2) Causes of immature convergence
The selection, crossover, and mutation operations considered in theory are absolutely accurate. They coordinate with each other and can search the entire solution space, but in practice this is not the case;
There are random errors (mainly including sampling errors and selection errors);
The problem solved is the genetic algorithm deception problem.
(3) Prevention of immature convergence
Specific steps of genetic algorithm
(1) Select a coding strategy to transform the parameter set (feasible solution set) into the chromosome structure space;
(2) Define the fitness function to facilitate calculation of fitness value;
(3) Determine the genetic strategy, including selecting population size, selection, crossover, mutation methods, and determining genetic parameters such as crossover probability and mutation probability;
(4) Randomly generate initialization groups
(5) Calculate the decoded fitness value of individuals or chromosomes in the population
(6) According to the genetic strategy, use selection, crossover and mutation operators to act on the population to form the next generation population
(7) Determine whether the population performance meets a certain indicator, or has completed the predetermined number of iterations. If not, return to step five, or modify the genetic strategy and return to step six.