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

NNGA 9

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

NNGA 9

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

Neural Networks &

Genetic Algorithms

Bujor Pavaloiu
Content

1. Artificial Intelligence, Machine Learnig,


Connectionist paradigm
2. McCulloch & Pitts neuron model. Perceptron
3. Adaptive Linear Neurons
4. Feed-Forward Neural Networks, Backpropagation
5.,6. Deep Learning
7. Competitive learning Kohonen Self-Organizing
Networks
8.,9.,10. Genetic Algorithms

Neural Networks & Genetic Algorithms 2


Genetic Algorithm

Neural Networks & Genetic Algorithms 3


Selection of parents

 Selection is done based on the performance/


fitness function - FF
 The FF shows how good an individual/
choromosome is at solving the given problem
and to participate at the next generation.
 It is usually the inverse of the error function for
the problem
 Not all the selected parents have the same
probability to participate to the next generation –
the probability is proportional with the FF.
Neural Networks & Genetic Algorithms 4
Roulette Wheel Selection

Fitness Cumulated CS
Function Sum normalized
8 8 0.4
6 14 0.7
4 18 0.9
2 20 1.0
1
0.9

0.7

0.4

Neural Networks & Genetic Algorithms 5


Crossover

 Crossover, also called Recombination, is a


genetic operator used to combine the genetic
information of two parents to generate new
offspring.
 It will generate new individuals, with new
genotype, inheriting genes/ traits/ features from
both parents.
 It is analogous to the crossover that happens
during sexual reproduction in biology.

Neural Networks & Genetic Algorithms 6


Mutation

 Mutation is a genetic operator applied toghether


with cloning.
 Cloning produces genetically identical
individuals of an organism and mutation will
change the genotype, creating new individuals.
 It is similar to the asexual reproduction from
biology.

Neural Networks & Genetic Algorithms 7


Next Generation

 Parents are kept usually in the next generation


 The fitness function is computed for this new
generation and the best fitted individuals
(chromosomes) are taken to create the next
generation.
 This procedure makes GA a heuristic search
method.

Neural Networks & Genetic Algorithms 8


Genetic representation

 GAs operate on the solutions representation (or


encoding), often referred to as chromosomes.
 There are several types of encoding

Binary encoding, where the chromosome is an
array of bits.

Value/Real Encoding, where the chromosome is
a array/vector of real numbers

Permutation encoding, where the chromosome
is a permutation

Tree encoding, where the chromosome is a tree
Neural Networks & Genetic Algorithms 9
Binary Encoding

 The chromosome is an array of bits:

Chr. A 0 0 1 1 0 1

 Crossover means changing bits between the


parents
Chr. A 0 0 1 1 0 1
Chr. B 1 0 1 0 1 1

Chr.M 0 0 1 0 0 1
Chr.N 1 0 1 1 1 1

Neural Networks & Genetic Algorithms 10


Binary Encoding

 Mutation means changing bits belonging to a


chromosome.

Chr. A 0 0 1 1 0 1

Chr.M 0 1 1 1 0 0

Neural Networks & Genetic Algorithms 11


Value Encoding

 The chromosome is a real number or an array of


numbers.
 Crossover is done usually by a weighted sum of
the genes (numbers in the array) between the
parents.
 Mutation is done usually by changing randomly
the genes in a given radius.
 It should be taken care that the reproduction
operation is consistent – the offspring is a valid
permutation.
Neural Networks & Genetic Algorithms 12
Value Encoding

 Mating

Chr. A 1.2 1 3 -3.1 1 2

Chr.B 1 -2 -1 2 0.1 0
wa=0.75
wb=0.25
Chr.B 1.15 0.25 2 -1.825 0.775 1.5
 Mutation

Chr.B 1.2 1 3 -3.1 1 2


R=.1

Chr.B 1.211 0.965 3.367 -3.012 1.074 2.123


3
Neural Networks & Genetic Algorithms 13
Permutation Encoding

 In permutation encoding, every chromosome


is a permutation of the integers from 1 to N.
Chr. A 4 3 6 2 1 5
 It can be used in ordering problems, such as
Travelling Salesman problem or task ordering
problem.
 Mutation is done by swapping two elements from
the permutation order.

Chr. A 4 1 6 2 3 5

Neural Networks & Genetic Algorithms 14


Tree Encoding

 Trees are used in genetic programming to


represent relations and expressions

Neural Networks & Genetic Algorithms 15

You might also like