0% found this document useful (0 votes)
15 views15 pages

Dilan Dlshad

The document provides an overview of genetic algorithms, which are optimization algorithms that mimic the process of natural evolution to find optimal solutions to complex problems. It discusses the key components of genetic algorithms, including population representation, selection, crossover, and mutation, and highlights their usefulness in scenarios where exact solutions are difficult to obtain. The document also contrasts genetic algorithms with neural networks, emphasizing their unique approach to problem-solving and optimization.

Uploaded by

karmandpshtiwan0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views15 pages

Dilan Dlshad

The document provides an overview of genetic algorithms, which are optimization algorithms that mimic the process of natural evolution to find optimal solutions to complex problems. It discusses the key components of genetic algorithms, including population representation, selection, crossover, and mutation, and highlights their usefulness in scenarios where exact solutions are difficult to obtain. The document also contrasts genetic algorithms with neural networks, emphasizing their unique approach to problem-solving and optimization.

Uploaded by

karmandpshtiwan0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Kurdistan regional government-iraq

Charmo of University
Computer science

CODE:150106039

(Genetic Algorithms)

Prepared by
(Dailan Dlshad saaed)
Supervised
(Zrar Khald Abdul)

2019-2020
Content

Introduction to Genetic Algorithms 2

AN OVERVIEW OF GENETIC ALGORITHMSA genetic 4

FUNCTION MAXIMIZATIONOne 4

How is an individual represented? 5

How are individuals selected for breeding? 5

How are individuals crossed-over? 6

Reslut 9

BIBLIOGRAPHY 13

1
Introduction to Genetic Algorithms

ABSTRACTA

genetic algorithm is one of a class of algorithms that searches a


solutionspace for the optimal solution to a problem. This search is done in a
fashionthat mimics the operation of evolution – a “population” of possible
solutionsis formed, and new solutions are formed by “breeding” the best
solutions fromthe population’s members to form a new generation. The
population evolvesfor many generations; when the algorithm finishes the
best solution is returned.Genetic algorithms are particularly useful for
problems where it is extremelydifficult or impossible to get an exact
solution, or for difficult problems wherean exact solution may not be
required. They offer an interesting alternative tothe typical algorithmic
solution methods, and are highly customizable, whichmake them an
interesting challenge for students.

The world is full of optimization problems. Nature constantly optimizes each


of her configurations. Each ecosystem fits together to use the symbiotic
nature of each element. Species have evolved to have the characteristics that
are most likely to lead to survival. The wind blows in directions that best
alleviate any imbalances in forces. The planets orbit in ways that best fulfill

2
the laws of motion. In understanding the environment, we often have to
discern the optimization problem to fully understand its solution.

Evolution is one of the most interesting optimization problems. Why have


humans evolved to have two hands, two eyes, two legs, one head, and a
large brain while other species have not? Does that make humanity the
pinnacle of the optimization problem? Why do guppies evolve to have
different characteristics in dissimilar environments? Can the process of
evolution be codified to understand these issues better?

A genetic algorithm is one of a class of algorithms that searches a solution


space for the optimal solution to a problem. This search is done in a fashion
that mimics the operation of evolution – a "population" of possible solutions
is formed, and new solutions are formed by "breeding" the best solutions
from the population's members to form a new generation. The population
evolves for many generations; when the algorithm finishes the best solution
is returned. Genetic algorithms are particularly useful for problems where it
is extremely difficult or impossible to get an exact solution, or for difficult
problems where an exact solution may not be required. They offer an
interesting alternative to the typical algorithmic solution methods, and are
highly customizable, which make them an interesting challenge for students.

3
AN OVERVIEW OF GENETIC ALGORITHMSA genetic:
algorithm is a type of searching algorithm. It searches a solution spacefor an
optimal solution to a problem. The key characteristic of the genetic
algorithm ishow the searching is done. The algorithm creates a “population”
of possible solutions tothe problem and lets them “evolve” over multiple
generations to find better and bettersolutions. The generic form of the
genetic algorithm is found in Figure 1. The items inbold in the algorithm are
defined here.The population is the collection of candidate solutions that we
are consideringduring the course of the algorithm. Over the generations of
the algorithm, new membersare “born” into the population, while others
“die” out of the population. A single solutionin the population is referred to
as an individual. The fitness of an individual is a measureof how “good” the
solution represented by the individual is. The better the solution, thehigher
the fitness – obviously, this is dependent on the problem to be solved.

FUNCTION MAXIMIZATIONOne

application for a genetic algorithm is to find values for a collection of


variablesthat will maximize a particular function of those variables. While
this type of problemcould be solved in other ways, it is useful as an example
of the operation of geneticalgorithms as the application of the algorithm to
the problem is fairly straightforward.For this example, let’s assume that we
are trying to determine the variables that producethe maximum value for this
function:f( w, x, y, z ) = w3 + x2 – y2 – z2 + 2yz – 3wx + wz – xy + 2This

4
could probably be solved using multi-variable calculus (although this
author’s skillsin that area are pretty rusty!), but it is a good simple example
of the use of geneticalgorithms. To use the genetic algorithm, we need to
answer the questions listed in theprevious section.

How is an individual represented?

How is an individual’s fitness calculated?Next we consider how to


determine the fitness of each individual. There isgenerally a differentiation
between the fitness and evaluation functions. The evaluationfunction is a
function that returns an absolute measure of the individual. The
fitnessfunction is a function that measures the value of the individual relative
to the rest of thepopulation.

How are individuals selected for breeding?

The key to the selection process is that it should be


probabilistically weighted so thathigher fitness individuals have a
higher probability of being selected. Other than
thesespecifications, the method of selection is open to
interpretation.One possibility is to use the ordinal method for the
fitness function, then calculatea probability of selection that is
equal to the individual’s fitness value divided by the totalfitness of

5
all the individuals. In the example above, that would give the first
individuala 40% chance of being selected, the second a 20%
chance, the third a 30% chance, andthe fourth a 10% chance.
Clearly this is giving the better individuals more chances to
beselected.A similar approach could be used with the average
fitness calculations. This wouldgive the first individual a 72%
chance, the second a 5% chance, the third a 22% chance,and the
fourth a 1% chance. This method makes the probability more
dependent on therelative evaluation functions of each individual.

How are individuals crossed-over?

Once we have selected a pair of individuals, they are “bred” – or in


geneticalgorithm language, they are crossed-over. Typically two
children are created from eachset of parents. One method for
performing the cross-over is described here, but there areother
approaches. Two locations are randomly chosen within the
individual. Thesedefine corresponding substrings in each
individual. The substrings are swapped betweenthe two parent
individuals, creating two new children. For example, let’s look at
our fourindividuals again: 1010 1110 1000 00110110 1001 1111
01100111 0110 1110 10110001 0110 1000 0000Let’s assume that

6
the first and third individuals are chosen for cross-over
(makingsense, as these are the two top individuals). Keep in mind
that the selection process israndom, however. The fourth and
fourteenth bits are randomly selected to define thesubstring to be
swapped, so the cross-over looks like this:1010111010000011
1010111010000011 1011011011101011 6
60111011011101011 0111011011101011
0110111010000011Thus, two new individuals are created. We
should keep creating new individualsuntil we have created enough
to replace the entire population – in our example, we needone more
cross-over. Assume that the first and fourth individuals are
selected this time.Note that an individual may be selected multiple
times for breeding, while otherindividuals might never be selected.
Further assume that the eleventh and sixteenth bitsare randomly
selected for the cross-over point. We would see a second cross-
over likethis:

1201010111010000011 1010111010000011
1010111010000000 6 60001011010000000
0001011010000000 0001011010000011So, our second
generation population is: 1011 0110 1110 1011 0110 1110 1000
0011 1010 1110 1000 0000 0001 0110 1000 00112.5. How are
individuals mutated?Finally, we need to allow individuals to
mutate. When using bit strings, the easiestway to implement the

7
mutation is to allow every single bit in every individual a chanceto
mutate. This chance should be very small, since we don’t want to
have individualschanging dramatically due to mutation. Setting
the percentage so that roughly one bit perindividual will change on
average is probably a reasonably good number.The mutation will
consist of having the bit “flip” – a 1 changes to a 0 and a 0changes
to a 1. In our example, assume that the bold and italicized bits
have been chosenfor mutation: 1011011011101011 6
1011011011101011 0110111010000011 6 0110101010000011
1010111010000000 6 1010111010010000 0001011010000011 6
0101011010000001

8
Reslut

Genetic algorithms are a form of machine learning that is focused


on optimizing a particular output or outputs based on successive
production of derived equations. The approach can be useful for
optimizing a particular result when no training data are available,
and when the optimization isn’t known mathematically.

These algorithms use the combination of selection, recombination,


and mutation to evolve a solution to a problem. At a descriptive
level, the intent of a genetic algorithm is to make a set of attempts
at solving a problem using randomly selected equations. The first
time through, it’s likely that none of the solutions are very good.
However, some are better than others. You take two of the better
ones, combine their parameters, and generate an entirely new
sequence of possible equations, derived from those two.

They’re called genetic algorithms because the process is loosely


modeled after the workings of genetic selection – that is, through a
combination of heredity, variation, and selection.

9
Algorithms are evaluated based on some criteria, and the best
algorithms are combined to form a next generation of algorithms,
some of which at least should perform better.

A key to propagating a genetic algorithm is its fitness – that is, its


ability to make incrementally and successively better predictions.
Fitness is a measure that the system designer develops to reflect
the overall success of the application. It could be to maximize
revenue, achieve a high throughput, or some other measure that
represents the business or technical goal.

The difference between a genetic algorithm and a neural network is


subtle but real. Neural networks use layers of (usually) relatively
simple algorithms that apply transformations to data across
multiple layers to model a particular process. A neural network
attempts to replicate often known results based on a training
dataset. Typically the only thing that changes from successive
neural network training runs is the algorithm coefficients, although
the number of layers or nodes in each layer can also be changed.

10
Genetic algorithms, on the other hand, search a domain based on
the biological principles of genetics. They apply successive efforts
with sets of algorithms based on the previous set in order to
optimize the fitness score. Also, typically a genetic algorithm
attempts to optimize; that is, find a relative fitness in the search
space. Searches parallel across the space, so that it doesn’t focus
on a local optimization. It’s possible, even likely, that the fitness
function may go down during successive generations before rising
again.

This type of algorithm works using the chromosome, which is a


range of potential solutions, rather than attempting to optimize
parameters as in a neural network. The chromosome is often
represented as a bit string, although it can take any type of numeric
form. It applies the “fitness score,” rather than a known
optimization. The end result is that it has the potential to find a
“good enough” solution, rather than an optimal solution.

Consider trying to spell out a particular word or phrase using a


genetic algorithm. You might start with three random sets of
letters – two of which contain letters in the desired word, and one
which does not. If you are using correct letters as your fitness

11
function, your algorithm might take the two results with the
desired letters, and combine them into new sets of letters. Based
on the information contained in the preceding generation, this has
the potential to result in a better fitness score. Eventually, the
algorithm series may converge on the right answer, or at least a
“good enough” answer.

You can also introduce mutation into the process; that is, injecting
random values into the next generation. That has the effect of
possibly accelerating the process of reaching an optimal result.

Using genetic algorithms can result in reasonable answers by


successively applying better prepared algorithms to a problem.
While they may not be used repetitively in general-purpose
applications, they can find answers that may not be found in any
other way.

12
BIBLIOGRAPHY

1. “An Overview of Genetic Algorithms: Part 1, Fundamentals”,


by David Beasley, DavidR. Bull, and Ralph R. Martin.
University Computing, volume 15(2), pages 58-69, 1993.

2. Computers and Intractability: A Guide to the Theory of NP-


Completeness, by MichaelR. Garey and David S. Johnson.
W.H. Freeman and Company, 1979.Adaptation in Natural and
Artificial Systems, by J.H. Holland. MIT Press, 1975.

3. Artificial Intelligence: A Modern Approach, Second Edition, by


Stuart Russell and PeterNorvig. Prentice Hall, 2003.

4. Davis, L. (Ed.) (1991).Handbook of genetic algorithms. New


York: Van Nostrand Reinhold

5. De Jong, K. A. (1975).Analysis of the behavior of a class of


genetic adaptive systems. Ph.D. dissertation, The University of
Michigan, Ann Arbor, MI

13
6. Goldberg, D. E. (1989).Genetic algorithms in search,
optimization, and machine learning. New York: Addison-Wes l
ey

14

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy