Ask for some information about the improvement of genetic algorithms

Updated on technology 2024-02-09
4 answers
  1. Anonymous users2024-02-05

    Summary. Hello, happy to answer your questions.

    The basic operation process of genetic algorithm is as follows:[2].

    1) Initialization: Set the evolutionary algebra counter t=0, set the maximum evolutionary algebra t, and randomly generate m individuals as the initial population p(0). [2]

    2) Individual evaluation: calculate the fitness of each individual in the population p(t). [2]

    3) Selection operation: The selection operator is applied to the group. The purpose of selection is to pass on the optimized individuals directly to the next generation or to generate new individuals through pairing and crossing, and then pass them on to the next generation. The selection operation is based on the fitness assessment of the individuals in the group. [2]

    4) Cross operation: The cross operator is applied to the group. The central role in genetic algorithms is the crossover operator. [2]

    5) Mutation operation: The mutation operator is applied to the population. That is, changes are made in the gene values of certain loci of individual strings in a population. The next generation of population p(t+1) is obtained after selection, crossover and mutation. [2]

    6) Termination condition judgment: if t=t, the individual with the maximum fitness obtained in the process of evolution is used as the optimal solution output, and the calculation is terminated. [2]

    Genetic manipulation consists of the following three basic genetic operators: selection; crossover; Mutation.

    Hope it helps. Please give a thumbs up, thank you!

    Ask about genetic algorithms.

    Hello, Mr. Wang has seen your question and is sorting out the information, please wait a while.

    Hello, happy to answer your questions. The basic operation process of genetic algorithm is as follows:[2](1) Initialization:

    Set the evolutionary algebra counter t=0, set the maximum evolutionary algebra t, and randomly generate m individuals as the initial population p(0). [2] (2) Individual evaluation: Calculate the fitness of each individual in the population p(t).

    2] (3) Selection operation: The selection operator is applied to the group. The purpose of selection is to pass on the optimized individuals directly to the next generation or to generate new individuals through pairing and crossing, and then pass them on to the next generation.

    The selection operation is based on the fitness assessment of the individuals in the group. [2] (4) Cross operation: The cross operator is applied to the group.

    The central role in genetic algorithms is the crossover operator. [2] (5) Mutation operation: The mutation operator is applied to the population.

    That is, changes are made in the gene values of certain loci of individual strings in a population. The next generation of population p(t+1) is obtained after selection, crossover and mutation. [2] (6) Judgment of termination conditions:

    If t=t, the individual with the greatest fitness obtained in the process of evolution is used as the optimal solution output, and the calculation is terminated. [2] Genetic manipulation consists of the following three basic genetic operators: selection; crossover; Mutation.

    Hope it helps. Please give a thumbs up, thank you!

  2. Anonymous users2024-02-04

    The first step in implementing a genetic algorithm is to define how the problem is encoded and decoded. For function optimization problems, there are generally two coding methods, each with its own advantages and disadvantages.

    Real coding: Directly representing genes in real numbers, it is easy to understand and does not require a decoding process, but it is easy to converge prematurely, thus falling into local optimum.

    Binary encoding: high stability and large population diversity, but requires large storage space, needs to be decoded and is difficult to understand.

    For solving the function maximum problem, I chose binary encoding.

    Take our objective function f(x) =x + 10sin(5x) +7cos(4x), x [0,9] as an example.

    If the solution accuracy is set to 4 decimal places, the solution space of x can be divided into (9-0) (1e+4)=90000 equal parts.

    2 16<90000<2 17, 17-bit binary numbers are required to represent these solutions. In other words, the encoding of a solution is a 17-bit binary string.

    In the beginning, these binary strings were randomly generated.

    One such binary string represents a string of chromosomes, and here the length of the string of chromosomes is 17.

    How do you restore (decode) any chromosome of these chromosomes to the values in the [0,9] interval?

    For this problem, we can use the following formula to decode:

    decimal( ) converts binary numbers into decimal numbers.

    General decoding formula:

    lower bound: The function defines the lower bound of the domain.

    upper bound: The upper limit of the function definition domain.

    chromosome size: The length of the chromosome.

    With the above formula, we can successfully decode the binary chromosome string into a decimal real solution in the [0,9] interval.

    Chromosomes are aggregates of DNA, each of which encodes a unique trait, such as hair or eye color.

    Think of it as an optimization problem that tries to find certain inputs with which we can get the best output or result.

    Genetic Algorithm Essentials:

    1.Initialize.

    Initialize all candidates, initialize randomly.

    2.Find the adaptation function.

    3.Choice: natural selection, survival of the fittest.

    Individuals with strong energy are selected first, and then randomly selected individuals who have little fitness but survive.

    4.Crossover: 5Variation: Select as needed.

  3. Anonymous users2024-02-03

    The basic principles of genetic algorithms are:

    Genetic algorithm is a search algorithm based on natural selection and population genetic mechanism, which simulates the phenomena of reproduction, hybridization and mutation in natural selection and natural genetic processes"Chromosomes", i.e., individuals, several individuals make up a group (all possible solutions). At the beginning of the genetic algorithm, the total segment of the ant filial piety is randomly generated some individuals (i.e., the initial solution), according to the predetermined objective function of each individual is evaluated, a fitness value is given, based on this fitness value, some individuals are selected to produce the next generation, the selection operation reflects the principle of the fittest, the "good" individuals are used to produce the next generation, the "bad" individuals are eliminated, and the selected individuals are crossed and mutated, and the operators are combined to generate a new generation. Because the individuals of this generation inherit some excellent traits of the previous generation, they are better than the previous generation in terms of performance, so that they gradually evolve in the direction of the optimal solution, so the genetic algorithm can be regarded as a preliminary evolution process of the population composed of feasible solutions.

  4. Anonymous users2024-02-02

    Genetic algorithms. In essence, it is a series of operations on chromosome patterns, that is, the good patterns in the current population are inherited to the next population through the selection operator, the pattern recombination is carried out by the cross operator, and the pattern mutation is carried out by the mutation operator.

    Steps. Basic framework.

    1.Encode. Since genetic algorithms cannot directly deal with the parameters of the problem space, the problem to be solved must be represented as a chromosome or individual in the genetic space through encoding.

    This conversion is called encoding, which can also be called a representation.

    There are three common criteria used to evaluate coding strategies:

    a) Completeness.

    completeness): All points in the problem space (candidate solutions) can be represented as points (chromosomes) in the GA space.

    b) Soundness: Chromosomes in the GA space correspond to all candidate solutions in the problem space.

    c) Nonredundancy: chromosomes and candidate solutions correspond one-to-one.

    2.Fitness function.

    Evolutionism. Adaptability is the ability of an individual to adapt to the environment, and also indicates the ability of the individual to reproduce offspring. The fitness function of genetic algorithm, also known as the evaluation function, is an index used to judge the superiority and inferiority of individuals in a group, and it is evaluated according to the objective function of the problem sought.

    Genetic algorithms generally do not need other external information in the process of searching for evolution, and only use evaluation functions to evaluate the advantages and disadvantages of individuals or solutions, and use them as the basis for future genetic operations. Since in the genetic algorithm, the fitness function is to be compared and sorted and the selection probability is calculated on this basis, so the value of the fitness function should be positive. It can be seen that in many cases, it is necessary to map the objective function to a fitness function in the form of a maximal value and a non-negative function value.

    The design of the fitness function mainly satisfies the following conditions:

    a) Single-value, continuous, non-negative, maximized.

    b) Reasonableness and consistency.

    c) Small amount of calculation.

    d) Strong versatility.

    In specific applications, the design of the fitness function should be combined with the requirements of the problem itself. The fitness function design has a direct impact on the performance of genetic algorithms.

    3.Initial population selection.

    Individuals in the initial population in genetic algorithms are randomly generated. Generally speaking, the following strategies can be adopted for the initial group setting:

    a) According to the inherent knowledge of the problem, try to grasp the distribution range of the space occupied by the optimal solution in the whole problem space, and then set the initial population within this distribution range.

    b) A certain number of individuals are randomly generated, and then the best individuals are selected and added to the initial group of jujube sensitives. This process is iterative until the number of individuals in the initial population reaches a predetermined size.

Related questions
9 answers2024-02-09

Postal Code, Magazine Name, Issue, Unit Price.

18-42 Youth Literature Monthly. >>>More

11 answers2024-02-09

...Big brother, is that Peking Opera? On the second floor, that's the rap mask. >>>More

7 answers2024-02-09

National Day Information:

October 1 is China's National Day. Under the leadership of the Communist Party of China, the Chinese people have gone forward one after another and won great victories in the people's revolution. On October 1, 1949, the founding ceremony was held in Tiananmen Square in Beijing, the capital, and in the rumbling salute, the **People**President solemnly announced the founding of the People's Republic of China and raised the first five-star red flag with his own hands. >>>More

8 answers2024-02-09

Stressed, in the case of brain fatigue, feeling stressed and wanting to give up everything. In fact, it is all a misunderstanding. Calm down and think about it, let yourself jump out of your fixed mindset and be a bystander. The real state of affairs is clear. It's nowhere near as serious as you think.

5 answers2024-02-09

First use an infantry or tank to drop the tank wide, and the barracks or laboratory blood only drop a little and then press"z"(That is, the flag below) piece has been pressed to put away, in the point engineer to select the tank to enter, barracks or laboratory, after the route is displayed, use the thief to point the destination of the engineer (that is, the square) and then put z to see on the line (if you use the following flag for exchange, you don't need to press z to see). >>>More