Basic principles and methods of genetic algorithm--notes < turn >

Source: Internet
Author: User

Recently learned genetic algorithms

The implementation of genetic algorithm has 6 main factors: parameter coding, initial population setting, fitness function design, genetic operation, algorithm control parameter setting, constraint condition processing.

Genetic gene gene chromosome chromosome population population replication Reproducation crossover crossover variation mutation adaptability fitness

SGA Basic Genetic algorithm (simple genetic algorithm) genetic operator Genetic Operator

SGA Basic Steps

1, chromosome encoding and decoding 2, the detection and evaluation of individual fitness 3, genetic operator (select operation using proportional selection operator, crossover operation using a single point crossover operator, mutation operation using basic bit mutation operator or uniform mutation operator) 4, the main parameter m population size t termination condition PC crossover probability PM mutation probability.

The basic genetic algorithm for optimization problem construction process:

1, determine the decision-making variables and Constraints 2, establish an Optimization Model 3, determine the encoding method 4, determine the decoding method 5, determine the individual evaluation Method 6, design the genetic operator and determine the genetic algorithm operating parameters.

I. Coding (Coding and decoding)

Coding: Transform the feasible solution of a problem from its solution space to the search space that the genetic algorithm can handle.

Decoding: The transformation from the genetic algorithm to the problem space.

One of the drawbacks of binary coding is the Hamming Cliff hamming cliff: There is a large hamming distance between the binary codes of some adjacent integers, which makes crossing and mutation difficult to cross.

De Jong based on the pattern theorem, the coding criteria proposed:

1. Building block rules: Codes should be easy to generate short and low-order blocks that are related to the problem being asked.

2, the minimum character set rule: The encoding should use the minimum character set to make the problem be natural representation and description.

The main coding methods are: binary coding, Gray code, floating-point number coding, multi-parameter cascade coding, multi-parameters cross-coding.

Coding evaluation Strategy: completeness, robustness, non-redundancy

Second, choose

Selection is the process of selecting a strong individual in a group to produce a new group.

According to the selection of fitness value of each individual, the probability that the higher degree of adaptability of the individual is inherited to the next generation group is greater. In this way, the fitness value of the individuals in the group is close to the optimal solution.

Common selection Operators: Roulette choice (Roulette Wheel Selection), stochastic competitive selection (Stochastic tournament), best retention options, no replay random selection, deterministic selection, no replay remainder random selection, uniform selection, optimal preservation strategy, Random league selection, crowding out selection (niche is commonly used).

Third, Cross

Crossover: is to select two individuals from a group by a larger probability, exchanging one or some bits of two individuals.

The crossover operation produces the offspring, and the descendants inherit the basic characteristics of the parent.

The design of crossover operator consists of two main contents: determining the location of intersection and how to exchange some genes.

Several crossover operators suitable for binary coding and floating-point encoding individuals: single-point crossover, two-points crossover, multi-point crossover, uniform crossover, arithmetic crossover.

Crossover algorithm is the main algorithm to generate new individuals, it determines the global search ability of genetic algorithm.

Iv. Variation

Mutation: A change in the number of bits or values on an individual's encoded string at a lesser probability.

Mutation operation refers to the genetic value of some loci in the individual chromosome encoding string replaced by other alleles of the gene block, thus forming a new individual.

Mutation itself is a kind of stochastic algorithm, it just produces the new individual's auxiliary algorithm, it determines the genetic algorithm's local search ability.

Several mutation operators suitable for binary and floating-point coded individuals: basic bit variation, uniform variation, boundary variation, nonuniform variation, Gaussian approximation variation

Five, fitness function

The fitness function, also called the evaluation function, is the standard that is determined by the objective function to distinguish the individual in the group, always non-negative, and in any case it is desirable that the value of the larger is better.

In the selection operation, there are two problems that become a genetic algorithm deception:

(1) In the early stage of genetic algorithm, usually produces some extraordinary individuals, according to the proportional selection method, these extraordinary individuals will be competitive, and control the selection process, affecting the algorithm's global optimization performance.

(2) in the later period of genetic algorithm, when the algorithm tends to converge, because of the difference of individual adaptability in population, the potential of continuous optimization is reduced, and some local optimal solution may be obtained.

The design of fitness function mainly satisfies the following conditions:

(1) Single-value, continuous, non-negative, maximum.

(2) reasonable and consistent.

(3) Low computational capacity

(4) Strong versatility.

In the different stages of genetic algorithm, it is necessary to expand or reduce the adaptive degree of individual, which is the scale transformation of adaptability, there are three kinds: linear scale transformation, the scale transformation of the right and the exponential scale transformation.

Six, the choice of control parameters.

The crossover probability PC always controls the crossover operator which plays the dominant role in the genetic operation, and the general proposed value range is 0.4~0.99.

Variance probability PM General recommended value Range is 0.0001~0.1

Group size can generally be selected according to the actual situation between 10~200.

Vii. Treatment of restrictive conditions

According to the specific problem generally can choose three kinds of methods: Search space limit method, feasible solution transformation method, penalty function method

Basic principles and methods of genetic algorithm--notes < turn >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.