0% found this document useful (0 votes)
6 views

Genetic Algorithm-01052024

Uploaded by

Hazwan Haziq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Genetic Algorithm-01052024

Uploaded by

Hazwan Haziq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Genetic Algorithm

MAY 2024

1
Introduction
Introduced by John Holland in 1975 (Holland, 1975)
It has been applied in various applications as a search and optimization tool
The search process and strategy of classical optimization algorithm relies on deterministic
procedures and based on sequential search in finding the optimum solution (Engelbrecht,
2002).
GA uses probabilistic transition rules and based on parallel search to approach the optimum
solution.

2
Introduction
CLASSICAL OPTIMIZATION GENETIC ALGORITHM

Deterministic procedure Probabilistic transition rules


Sequential search Parallel search
Requires derivative information Not require derivative information
Good for linear, quadratic, uni-modal and Good for discontinuous, non-differentiable,
other specialized optimization problem multi-modal and noisy problems.

3
What we are solving with GA?

9-4 4
Evolutionary Algorithm
The evolutionary approach to machine learning is based on computational models of natural
selection and genetics.
We call them evolutionary computation, an umbrella term that combines
◦ genetic algorithms,
◦ evolution strategies and
◦ genetic programming.

All these techniques simulate evolution by using the processes of selection, mutation and
reproduction.

5
Simple Genetic algorithms
Holland’s original GA is now known as
the simple genetic algorithm (SGA)
Other GAs use different:
◦Representations
◦Mutations
◦Crossovers
◦Selection mechanisms

6
SGA technical summary tableau

Representation Binary strings

Recombination N-point or uniform

Mutation Bitwise bit-flipping with fixed


probability
Parent selection Fitness-Proportionate

Survivor selection All children replace parents

Speciality Emphasis on crossover

7
Representation

Phenotype space Genotype space =


Encoding {0,1}L
(representation) 10010001
10010010
010001001
011101001
Decoding
(inverse representation)
8
SGA reproduction cycle

1. Select parents for the mating pool


(size of mating pool = population size)
2. Shuffle the mating pool
3. For each consecutive pair apply crossover with
probability pc , otherwise copy parents
4. For each offspring apply mutation (bit-flip with
probability pm independently for each bit)
5. Replace the whole population with the resulting
offspring

9
Binary Coded GA
Binary-coded GA is to show the similarity of
the algorithm in artificially emulating some
fundamental of genetic operations.
Genetic operations involved in the algorithm
are inspired by biological process

10
Chromosome Representation
A population of individuals is utilized in finding optimal solution as it is evolved toward better
solutions
The characteristic of an individual are represented by a chromosome
For n-dimensional search space, a chromosome will consist of n genes of fixed length

11
Selection Operator
The objective of selection operator is to keep good individual and remove bad individual in a
population.
The selection operator firstly identify good or bad individual based on the fitness quality.
In general, there are several selection operators exist in literature such as tournament selection,
proportionate selection and ranking selection (Goldberg, 1990)

12
Crossover
The objective of crossover operation is to produce new offspring from selected parents in
mating pool.
Parents in mating pool are picked randomly and some portions of the strings are swapped
between the strings to produce offspring.

13
Mutation
Mutation in GA provides diversity in solution which enables the algorithm to search a wider
space.
There are several ways of performing mutation in algorithm such as random mutate and inorder
mutate.

14
Elitism
Elitism is introduced to preserve the best found individual in subsequent generations.
This operation does not guarantee the solution to be optimal but ensures the solution to be
improved over time.

15
Real Coded GA
The working principle of real-parameter GA and binary-coded GA is similar except for the
representation scheme.
Real-parameter GAs deal with real parameter values in representing every individual in a population.
In real-parameter GA, crossover and mutation operators are applied directly to real parameter
values.
The crossover and mutation operator in binary-coded GA cannot be directly applied to real-
parameter GA. Therefore
◦ Simulated Binary Cross Over
◦ Polynomial Mutation

16
Example
Fitness Function

note: assumes x ranges between 0 and 15

17
Initialization

18
Selection Operator

19
Crossover

20
Mutation

21

You might also like