Genetic algorithm 遗传算法-wiki
A genetic algorithm (GA) is a arch technique ud in computing to find exact or approximate solutions to optimization and arch problems. Genetic algorithms are categorized as global arch heuristics. Genetic algorithms are a particular class of evolutionary algorithms (EA) that u techniques inspired by evolutionary biology such as inheritance, mutation, lection, and crossover.
Contents
1 Methodology
1.1 Initialization
1.2 Selection
1.3 Reproduction
1.4 Termination
毛蟹的做法
2 The Building Block Hypothesis
2.1 Criticism of the Building Block Hypothesis
3 Obrvations
4 Variants
5 Problem domains
6 History
7 Related techniques
8 Applications
10 References
11 External links
11.1 An Alternative to the Building Block Hypothesis
11.2 Applications
11.3 Resources有借无还
数据库测试11.4 Tutorials
[edit] Methodology
Genetic algorithms are implemented in a computer simulation in which a population of abstract reprentations (called chromosomes or the genotype of the genome) of candidate solutions (called individuals, creatures, or phenotypes) to an optimization problem evolves toward better solutions. Traditionally, solutions are reprented in binary as strings of 0s and 1s, but other encodings are also possible. The evolution usually starts from a population of randomly generated individuals and happens in generations. In each generation, the fitness of every individual in the population is evaluated, multiple individuals are stochastically lected from the current population (bad on their fitness), and modified (recombined and possibly randomly mutated) to form a new population. The new population is then ud in the next iteration of the algorithm. Commonly, the algorithm terminates when either a maximum
number of generations has been produced, or a satisfactory fitness level has been reached for the population. If the algorithm has terminated due to a maximum number of generations, a satisfactory
solution may or may not have been reached.
Genetic algorithms find application in bioinformatics, phylogenetics, computational science, engineering, economics, chemistry, manufacturing, mathematics, physics and other fields.
A typical genetic algorithm requires:
a genetic reprentation of the solution domain,
a fitness function to evaluate the solution domain.
梦见房子倒塌A standard reprentation of the solution is as an array of bits. Arrays of other types and structures can be ud in esntially the same way. The main property that makes the genetic reprentations convenient is that their parts are easily aligned due to their fixed size, which facilitates simple crossover operations. Variable length reprentations may also be ud, but crossover implementation is more complex in this ca. Tree-like reprentations are explored in genetic programming and graph-form reprentations are explored in evolutionary programming.
The fitness function is defined over the genetic reprentation and measures the quality of the reprented solution. The fitness function is always problem dependent. For instance, in the knapsa
ck
王国经典problem one wants to maximize the total value of objects that can be put in a knapsack of some fixed capacity. A reprentation of a solution might be an array of bits, where each bit reprents a different object, and the value of the bit (0 or 1) reprent s whether or not the object is in the knapsack. Not every such reprentation is valid, as the size of objects may exceed the capacity of the knapsack. The fitness of the solution is the sum of values of all objects in the knapsack if the reprentation is valid, or 0 otherwi. In some problems, it is hard or even impossible to define the fitness expression; in the cas, interactive genetic algorithms are ud.
Once we have the genetic reprentation and the fitness function defined, GA proceeds to initialize a population of solutions randomly, then improve it through repetitive application of mutation, crossover, inversion and lection operators.
金文书法[edit] Initialization
Initially many individual solutions are randomly generated to form an initial population. The population size depends on the nature of the problem, but typically contains veral hundreds or thousands of possible solutions. Traditionally, the population is generated randomly, covering the enti
re range of possible solutions (the arch space). Occasionally, the solutions may be "eded" in
areas where optimal solutions are likely to be found.
[edit] Selection
Main article: Selection (genetic algorithm)
During each successive generation, a proportion of the existing population is lected to breed a new generation. Individual solutions are lected through a fitness-bad process, where fitter solutions (as measured by a fitness function) are typically more likely to be lected. Certain lection methods rate the fitness of each solution and preferentially lect the best solutions. Other methods rate only a random sample of the population, as this process may be very time-consuming.
Most functions are stochastic and designed so that a small proportion of less fit solutions are lected. This helps keep the diversity of the population large, preventing premature convergence on poor solutions. Popular and well-studied lection methods include roulette wheel lection and tournament lection.
[edit] Reproduction
什么时候是安全期
Main articles: Crossover (genetic algorithm) and Mutation (genetic algorithm)
什么软件能挣钱
The next step is to generate a cond generation population of solutions from tho lected through genetic operators: crossover (also called recombination), and-or mutation.