• Nie Znaleziono Wyników

Genetic algorithms

N/A
N/A
Protected

Academic year: 2021

Share "Genetic algorithms"

Copied!
7
0
0

Pełen tekst

(1)

ADRIAN SOBKOWSKI TOMASZ KAŁACZYēSKI

University of Technology and Life Sciences

Summary

Many methods to optimize our operations rely on careful movement from point to point in a certain decision area in accordance with the selection rule specifying the next step. However, it is not safe because there is a possibility of stepping on a "false" (no global) maximum in multimodal (containing many vertices) space ex-ploration. In contrast, genetic algorithms work at the same time on rich base points (the population of coded strings), climbing at the same time on many vertices; thus, the chance of getting stuck on a local tip is much smaller.

Keywords: genetic algorithms, evolution strategies, genetic programming, evolutionary program-ming, search, automated programprogram-ming, parallel algorithms

1. Introduction

According to Charles Darwin's theory from 1859, the complexity of life on Earth is a result of evolution and natural selection. Genetic algorithms were created from observations of natural processes occurring in nature. Thanks to genetic algorithms, the phenomena of evolution and natural selection that occur among populations of living individuals were unravelled.

In 1975, John Holland of the University of Michigan, basing on the model of mechanisms of evolution and taking into account the fact that evolution occurs on chromosomes rather than living beings, created the first genetic algorithm. His aim was to describe and explain the essence of strictly adaptive processes found in the natural world and create a system constructed for use by man software which mirrors fundamental mechanisms governing biological systems. Evolutionary processes last in nature for very long, but the reflection of those processes in computer simulations results in a powerful optimization tool.

Genetic algorithms are random algorithms searching for solution space, but their design re-veals (using the mechanism of natural selection) that fate is not completely blind, often reminis-cent of the methods of optimization problem ingenuity of the human mind.

Genetic algorithms are based on the mechanisms of natural selection and heredity. They com-bine the evolutionary principle of survival of the fittest with a systematic, but randomized informa-tion exchange. In each generainforma-tion there appears a new team of artificial organisms (bit strings), created from a combination of fragments of the fittest representatives of the previous generation, except that a new component is occasionally tried out.

Despite their randomness, genetic algorithms cannot be underestimated. They use effectively past experience to determine the new search area for the expected increased efficiency.

The central theme in the research on genetic algorithms is resistance, which is a compromise between efficiency and effectiveness necessary to survive in diverse environments. In systems

(2)

produced by humans, implications of resistance are various. If we can build a resistant technical system, then we can save costly alterations, or even completely eliminate them. If you manage to achieve a higher degree of adaptation, the existing systems can function better and longer. Design-ers of other systems – i.e. engineering, computer, as well as economic – can only admire the strength, efficiency and flexibility of biological systems. The ability to regenerate, self-steer and self-reproduce, which is a norm in the world of biology, is almost absent in the world's most advanced technology.

2. Method of operation

To resolve a genetic algorithm task, it must be properly saved firstly. The problem is coded as bit strings (zeros and ones) that make up a chromosome. The most commonly used chromosome coding:

– vector of genes, which each may be one or multi-bit integer number or a real number. – using tree-data structures.

Contrary to appearances, this is not simple, and a coding problem has a large impact on the ef-fectiveness of an algorithm.

Appropriate introduction to a computer algorithm may provide techniques for solving difficult problems in the way nature does – through evolution. Algorithms using selection and reproduction mechanisms, like in nature, can find 'good' chromosomes, without knowledge about the nature of the problem which is to be solved. The only criterion in order to achieve such results is to evaluate each chromosome in terms of adaptation. While we know the function, we can adapt by using genetic algorithms and find their optima. It is assumed that feature adaptation takes non-negative values and, moreover, that the optimization problem which is to be solved is the problem of searching for maximum functionality. If the original form, if the function does not satisfy these assumptions, it makes some transformation functions to adapt.

An important feature of genetic algorithms is their high "resistance" in comparison with clas-sical methods (analytical, review and random). In this respect, genetic algorithms are very attrac-tive because they give good results in a broad spectrum of problems.

The stages of genetic algorithm are implemented as follows:

– 1st choice of initial population – chains are implemented in many ways, but often this is done randomly, which ensures finding a global maximum of quality (avoid stopping in local maxima). – 2nd quality assessment – carried out by the quality function of an individuals based on their phenotype; it may be accurate in the case of searching for an extreme function, or – as is happens

(3)

very often – estimated or flawed. The approximation may come from the fact that the quality of the chain may be dependent on the quality parameter, for example a baseline for control. To free from the influence of parameter calculations, calculations of quality parameters must be per-formed, and the results must be averaged.

– 3rd reproduction (selection)– it is the choice of the best populations of chains, and it leaves them in the population. Strings which are not selected are removed from the system. In newly estab-lished populations, chains occur repeatedly. Mostly, the choice of chains is made at random. There are many methods of selection. For example a roulette method. We build a virtual circle, which suits diverse segments of individuals. The better the individual, the greater the slice consumed. The size of fragments may depend on the value of the evaluation function, whether a higher value of the assessment indicates a higher adaptation it has. In this context, the probability that a better individual is selected as a parent is higher. Unfortunately, evolution in such an algorithm deceler-ates. If individuals are similar, each gets an equal fragment of fortune and selection pressure decreases. The algorithm distinguishes between individuals such as worse and weaker.

Devoid of this defect is a method of ranking. We calculate function evaluation for each indi-vidual, and set him or her in a series of best-worst. The first on the list gets the right to reproduce, and the rest go to the past. The disadvantage of the method is insensitiveness to the differences between successive individuals in the queue. You may find that the neighbours on the list of solutions have different values of the evaluation function, but they get almost the same number of descendents.

There is also a multi-selection method. We make several different evaluation functions (which evaluate some characteristics of selected individuals separately). For example, individuals may be arranged not in one but in several ranks of the best-worst, and the selection process is more complex. As you can see, selection gives a higher probability of reproduction of individuals with large adjustment- so successive generations are increasingly better adapted. However, genotype population diversity is falling- the population over time is monopolized by a slightly different (or even identical) varieties of the same individual thanks to the convergence of the best solutions to a certain limit. Sometimes convergence is untimely, evolution doesn’t work properly, and solu-tions represent some local extremes. They may be far from the expected global solusolu-tions.

– 4th Crossing – is a combination of some (selected randomly) genotypes in one. Associating causes that a descendant of two parents has a set of characteristics, which is a combination of features (it may happen also with the best ones). The crossing is dependent on the encoding of chromosomes and specificity of the problem. An example of how to use the crossing divides two into one chromosome and creates a new one by glueing the left side of one parent with the right part of the other parent (for the chromosome with integer binary encoding). The probability of crossing describes how often you want to perform the crossing. If there is no crossing, descendents is exact copies of their parents. Otherwise, a child is created from a parent chromosome. Crossing gives hope that the new chromosome will have good parts of old chromosomes and may be better than them. However, sometimes it is a good idea to leave some parts of the population unchanged and move to the next generation.

– 5th Mutation – is an occasional (occurs with a small probability) random element of change within the code. Mutation is random wandering in the space of strings of code. It is treated as a secondary mechanism and used sparingly in addition to reproduction and crossing. It provides a kind of insurance policy against the loss of important components of solutions.

(4)

The probability of mutation says how many mutations of a chromosome occur. If there is no mutation, a child remains unchanged. While there is a chromosome mutation, the subject changes. AG mutation prevents settling on a local extremum, but it should not occur too often because it can replace random AG wandering.

Applied in practice, genetic algorithms are often very different from what is shown above a classical genetic algorithm. The primary modification is to adopt a representation of points different from binary strings – such as representation by real numbers. This entails changing the crossing points. Another modification is to assess the quality of point accumulation. That is when we cannot accurately evaluate the quality of the point.

Diagram of genetic algorithm

3. Genetic algorithms and traditional optimization methods

Many methods to optimize our operations rely on careful movement from point to point in a certain area of decision in accordance with the selection rule specifying the next step. However, it is not safe because there is a possibility of stepping on a "false" (no global) maximum in multi-modal (containing many vertices) space exploration. In contrast, genetic algorithms work at the

Yes No

Initial population generation Estimate chromosomes fitness

function Chromosomes selection

eg roulette method Create a new population by mutation and crossover operators

The population of parents cleared,

The children population Finish? Stop. The best chromosome from the current population becomes a solution.

(5)

same time on rich base points (the population of coded strings), climbing at the same time on many vertices; thus, the chance of getting stuck on a local tip is much smaller. Features such as encryption parameters, effects on populations, the use of minimum information about a task and randomized operation constitute the final effect on the strength of a genetic algorithm, hence its advantage over other commonly used techniques. The most traditional methods give good results for a narrow class of problems. The methods of exhaustive and random walks are not equally effective in a broad spectrum of problems, but the method of proof gives good results in a broad spectrum of problems.

The following features distinguish genetic algorithms from conventional optimization tech-niques:

– operating on bit strings;

– effects on populations and not on individual points; – search sampling method ("blind" search);

– random selection rules. 4. The use of genetic algorithms

Genetic algorithms are used wherever a way to solve a problem is not well defined or known, but you know how to assess the quality of a solution. An example is the travelling salesman problems, such as where to find the shortest path connecting all cities so as to pass through each city only once. Quality evaluation of the proposed route is quick, but finding the optimal route is eligible for the class NP-hard problem. When using an evolutionary approach, one can find a good solution very quickly, but get only sub-optimal solutions due to the difficulties in formally de-scribed problems of NP class. Genetic algorithms also do well in finding approximations of the extremes of functions which cannot be calculated analytically.

A wide range of applicability of genetic algorithms is largely due to the fact that as a criterion a fitness function (function adaptation) is assumed, considering the optimization problem at a time when other methods are largely dependent on additional information and break down, where such information is not available or difficult to obtain. Genetic algorithms are also used to manage the population of neural networks. Machine design and electrical circuits are a perfect field to demon-strate the use of genetic algorithms. An engineer, when creating new ideas, usually does not have to find the best possible solution. He only needs to approximate boundary conditions and optimi-zation of the project. In addition, genetic algorithms, unlike the man, do not work schematically. The program does not know earlier projects, and, therefore, sometimes exhibits a degree of inven-tiveness. What's more, the man often bases on very approximate models, which give a false picture of the problem. Genetic algorithm can analyze a complex model and find a solution which the man would not propose.

Genetic algorithms are used in many areas. These are among others: – modelling and identification of noise sources;

– finding the best possible location of sources to compensate and sensing elements which are components of each system to the active noise reduction;

– adapting controller parameters of an active system of reduction.

The opposition vibration and vibration of machinery or equipment reduction is performed with the use of eliminators of vibration in which the optimization of the control system is done using genetic algorithms.

(6)

Applications include:

– mathematics, e.g. find extrema of functions, combinatorial problems;

– medical, e.g. processing of medical X-ray images, medical image analysis system using digital angiography differential (Fitzpatrick, Grefenstette, Van Gucht);

– diagnostics, e.g. identifying the sources of vibration machines; – design e.g. optimization of gas pipeline, buildings and machinery;

– transport, e.g. travelling salesman problem, linear transport, the task of nonlinear transport, other transport tasks;

– technology, e.g. cable connections – route planning, control, planning an optimal path of robot avoiding obstacles, the design of evolutionary robots;

– economies, e.g. forecasting stock quotes, schedules, procurement planning; – and many others.

5. Conclusion

It is theoretically and empirically proved that genetic algorithms are a "resistant" search method in complex search spaces. Paraphrasing a famous saying: "If genetic algorithms are clever, why are not they rich?" Still, genetic algorithms are rich in applications in a large and growing number of areas.

Genetic algorithms are increasingly used in wider and wider areas of applications in the envi-ronments of scientific, engineering and business circles. The reason for this is obvious: genetic algorithms are a simple and powerful tool in the search for better solutions. Although in the theory and application of genetic algorithms there is still much to discover, the diversity and effectiveness of genetic algorithms is admirable.

Computing power of today's computers is still too small to take full advantage of their oppor-tunities. Hence, probably the last 30 years of the development of genetic algorithms proceeded without much fanfare. However, they will be more and more widely used for practical purposes, and the progress of computer technology will certainly have a positive impact on their develop-ment in the near future and will cause that in a few of years’ time genetic algorithms will get "under the thatch."

Bibliography

1. David E. Goldberg, Algorytmy genetyczne i ich zastosowania, Warszawa 2003.

2. Z. Michalewicz, Algorytmy genetyczne + struktury danych = programy ewolucyjne, War-szawa 2003.

3. S. Domek, A. Parus.: Wykorzystanie algorytmu genetycznego do optymalizacji układu ste-rowania eliminatorem drgaĔ obrabiarki, Modelowanie inĪynierskie, Gliwice 2006 nr 32, s. 119–126.

4. G. Makarewicz, Wiktor M. Zawieska.: Zastosowanie algorytmów genetycznych do aktywnej redukcji hałasu, BezpieczeĔstwo Pracy, nr1, 2003.

(7)

ALGORYTMY GENETYCZNE Streszczenie

Algorytmy ewolucyjne powstały juĪ w latach szeĞüdziesiątych. Stosują zasady natury: ewolucja poprzez dobór najlepiej przystosowanych jednostek, osób reprezen-tujących rozwiązania problemu matematycznego. Algorytmy genetyczne są ogólnie najlepszym i najbardziej solidnym rodzajem algorytmów ewolucyjnych. One zostały wynalezione przez Johna Holland i przedstawione w ksiąĪce "Adaptacja w naturalne i sztuczne Systems" z roku 1975.

Słowa kluczowe: algorytmy genetyczne, strategie ewolucyjne, programowanie genetyczne, programowanie ewolucyjne, poszukiwanie, automatyczne programowanie, algorytmy równoległe

*This paper is a part of WND-POIG.01.03.01-00-212/09 project. Liwiusz SzczepaĔski

Adrian Sobkowski Tomasz KałaczyĔski

Department of Mechanical Engineering University of Technology and Life Sciences

Cytaty

Powiązane dokumenty

Po- gromy, Shoah, a w rezultacie masowe fale migracji niemal całkowicie wyzuły miasto z jego żydowskości, o której pamięć pielęgnują dziś głównie migranci oraz

It examines how visual storytelling through sketching can help a strategy consultancy engage its clients’ employees with a new vision.. We provide examples and insights on how

Plate towers are column scrubbers, in which many plates (or trays) are placed horizontally. The principle of this process is based on the gas bubbles flow through the gaps in

przez Sąd Rejonowy dla Warszawy-Pragi działalność tego Związku określona jest jako zapewnienie spół­ dzielniom pomocy w realizacji zadań statutowych (§ 4

Program szkół średnich z 1919 roku45 związany był z istniejącym wówczas systemem oświatowym, który obejmował, aż do roku 1935, trzy niższe klasy gim­ nazjalne,

Komurasaki jest Sezamem, proponującym uczestnictwo w akcji rozgrywającej się. w kilku warstwach

„Psyche” w edług niego składa się z dwóch elementów: świadomego i nieświadomego, które wzajemnie uzupełniają się i w yrów nują, tak że cała