0% found this document useful (0 votes)
43 views28 pages

Genetic Algo

Genetic algorithms are a search technique inspired by biological evolution to find solutions to optimization and search problems. A genetic algorithm uses operations like selection, crossover and mutation on a population of solutions represented as chromosomes. It iteratively applies these operations until converging on an optimal or near-optimal solution. The document provides examples of how genetic algorithms work, including initializing a population randomly, calculating fitness, selecting parents for reproduction, performing crossover and mutation to generate new solutions, and repeating until a termination condition is met. Applications of genetic algorithms include optimization problems in various domains like bioinformatics, engineering, economics and physics.

Uploaded by

nass_cs
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views28 pages

Genetic Algo

Genetic algorithms are a search technique inspired by biological evolution to find solutions to optimization and search problems. A genetic algorithm uses operations like selection, crossover and mutation on a population of solutions represented as chromosomes. It iteratively applies these operations until converging on an optimal or near-optimal solution. The document provides examples of how genetic algorithms work, including initializing a population randomly, calculating fitness, selecting parents for reproduction, performing crossover and mutation to generate new solutions, and repeating until a termination condition is met. Applications of genetic algorithms include optimization problems in various domains like bioinformatics, engineering, economics and physics.

Uploaded by

nass_cs
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

GENETIC ALGORITHM

Represented By :
CSE 4TH Year, Sec-A
Debasish Karmakar (0922051)
Md. Nasim Ansari (0922121)
Pitambar Mandal (0922126)
Nirmalya Neogi (0922127)
Tania Paul (0922128)
INTRODUCTION

 Genetic Algorithm use the concept of “Natural


Selection & Genetic Inheritance” by Darwin and
inspired by the biological evolution process.
 Genetic Algorithm developed by John Holland at
the beginning of 60s.
What is Genetic Algorithm?

 A genetic algorithm (GA) is a search technique


used in computing to find exact or
approximate solutions to optimization and
search problems.
 Genetic algorithms are categorized as a
heuristic search method.
BACKGROROUND OF GENETIC
ALGORITHM
 A solution can be represented as a
chromosome .
 A chromosome consist of genes .

A B C D E F G H I J..
chromosome
gene
FLOWCHART OF GENETIC
ALGORITHM
start
chromosome encoding
Generation=0 population creation
fitness evaluation
yes
stop convergence?
Next Generation
no
selection
cross-over
mutation
replacement
Initial Population

 Initially many individual solutions are


randomly generated to form an initial
population.
For example we can say, there are N(20)
chromosomes in the initial population.
Fitness Factor

 Fitness factor actually test each chromosome


to see how good it is at solving the problem .
 Fitness factor assign a value that is try to
maintain by all individual problems to get
better chance of the solution.
Selection
 Main idea:
1.Better individuals to get higher chance.
2.Chances proportional to fitness.
Implementation:
Roulette wheel technique.
» Assign to each individual a part of the roulette
wheel
1/6 = 17%

A B fitness(A) = 3
C fitness(B) = 1
3/6 = 50% 2/6 = 33%
fitness(C) = 2
Reproduction

 The next step is to generate a second


generation population of solutions from those
selected through genetic operators: crossover
(also called recombination), and/or mutation.
Crossover

 By crossover a chromosome pair interchanges


some parts within themselves with a
probability called crossover probability.
 The crossover probability is about 60%-70%.
 Types of crossover
1.Single Point crossover-

111111 ------------> 111000


000000 crossover 000111

2. Two point crossover--

the first string = 01001000 ----------> 01101000


the second string = 11101111 crossover 11001111

here, crossed over done between 2nd & 6th problem.


Mutation

 By mutation the properties of a chromosome


get changed randomly with a very small
mutation probability.
 The probability of mutation is very low i.e.
0.005%.
Convergence

 Convergence means generational process is


repeated until a termination condition has
been reached.
Why choose Genetic Algorithm?
1.GAs work with a coding for the parameter
set.
2.GAs search from a population of points, not a
single point.
3.The Genetic Algorithms are first suited for the
optimization problem.
4.GAs are used stochastic operators
(selection,crossover,mutation).
Example N-Queens problem

 N no. of queens
• M o. of rooms
• Does not sit in same row,same column and
same diagonal
 
 Explain this here
• N=8
• M=64
Initial Population

 Initial Population
 Randomly put those queen in the rooms
 Consider this operation for ‘K(5)’ no. of times
1 3 5 7 8 2 4 6

1 2 3 4 5 6 7 8

1 3 4 7 6 5 2 8

2 1 3 5 6 7 4 8

3 1 2 4 6 5 8 7
 We are putting value for Chromosomes no. =5
into 64 rooms.

Q3
Q1
Q2
Q4
Q6
Q5
Q8
Q7

Calculate total cost(no. of time does not satisfied the confition)
Calculate feetness value

Total Fitness
cost value
1 8
1 3 5 7 8 2 4 6
8 1
1 2 3 4 5 6 7 8
4 5
1 3 4 7 6 5 2 8
5 4
2 1 3 5 6 7 4 8
3 6
3 1 2 4 6 5 8 7
Selection Method

Using : roulette
6/24=.25
• 8/24=.33 wheel technique
• C • C1 according to the
5 example
C4
• 4/24 = .17
5/
24
=.2

C3
1
Crossover: two types

• Single point cross over:


• Before crossover –
• Parents:
• Considering single crossover point is 3
2 1 3 5 6 7 4 8

3 1 2 4 6 5 8 7

After crossover-
Children:
2 1 3 4 6 5 8 7
Total cost = 4 Fitness value=1
3 1 2 5 6 7 4 8
Total cost = 3 Fitness value=2
Multipoint crossover:-

• Before crossover –
• Parents:
• Considering crossover point are 3 and 5

2 1 3 5 6 7 4 8

3 1 2 4 6 5 8 7
• After crossover-
• Children:

• Here
2 4 is1 coming
3 two times
4 & 65 is missing
7 in 4the cell8

• Here 5 is coming two times& 4is missing in the cell


3 1 2 5 6 5 8 7
Mutation
• Before Mutation
3 1 4 5 6 8 7 2

After Mutation
3 1 4 5 7 8 7 2

• Here 7 is coming two times & 6 is missing in the room


Continue

• We previously send the best chromosomes(best


fitness value) for the next
• Generation.Now after crossover we are sending
the other four chrosomes (better fitness value )
for the next generation.
• Performing Crossover among the next
generation(iteration) for the best fitness value.
• Stop the iteration when satisfy the conditions or
• Perform this operation 100 times.
Criticisms of GA
There are several criticisms of the use of a genetic
algorithm compared to alternative optimization algorithms:
1.Repeated fitness function evaluation for complex
problems often requires very expensive fitness function
evaluations.
2.The "better" is only in comparison to other solutions. As a
result, the stop criterion is not clear in every problem.
3.In many problems, GAs may have a tendency to converge
towards local optima or even arbitrary points rather than
the global optimum of the problem.
Application of GA
• Bioinformatics
• Phylogenetics
• Computational Science
• Engineering
• Economics
• Chemistry
• Manufacturing
• Mathematics
• Physics
Conclusion
• Even creationists find it impossible to deny that
the combination of mutation and natural selection
can produce adaptation. Nevertheless, they still
attempt to justify their rejection of evolution by
dividing the evolutionary process into two
categories - "microevolution" and
"macroevolution" - and arguing that only the
second is controversial, and that any evolutionary
change we observe is only an example of the first.
Question?
Thank You.

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