SlideShare une entreprise Scribd logo
1  sur  24
Blue Trail Software
Evolutionary Computing
Genetic Algorithms
An Introduction
Martín Pacheco
Overview of Topics
1. Biological inspiration
2. What is evolutionary computing (EC)
3. General outline of the evolutive algorithm (EA)
4. Genetic algorithm (GA) overview
5. SGA technical summary
6. SGA reproduction cycle
7. SGA operators
8. Practical Application Example:
“It is not the strongest of the
species that survives, nor the most
intelligent, but the one most
responsive to change.”
Biological Inspiration
● To understand biological processes
properly, we must first have an
understanding of the cell
● Human bodies are made up of
trillions of cells
● Each cell has a core structure
(nucleus) that contains your
chromosomes
● Additionally, each of our 23
chromosomes are made up of tightly
coiled strands of deoxyribonucleic
acid (DNA)
The Origin of
Species (1859)
Biological Inspiration
● Reproduction involves
recombination of genes
from parents and then small
amounts of mutation (errors)
in copying
● The fitness of an organism is
how much it can reproduce
before it dies
● Here is an example of the
passing of chromosomes
within human reproduction
What is evolutionary computing (EC)
● Evolution of species:
○ Natural selection
○ Genetic operators
● Biological sciences provide inspiration and
terminology
General Outline of EA
Population
Offspring
Parents
Parent selection
Recombination
Mutation
Survivor selection
Initialization
Termination
Genetic algorithm (GA) overview
● Originally developed by John Holland (1975).
● Genetic Algorithm’s have 2 essential components:
○ “Survival of the fittest”
○ Genetic Diversity
● The genetic algorithm (GA) is a search heuristic that
mimics the process of natural evolution.
● Attributed features:
○ Not too fast
Genetic algorithm (GA) overview
● Holland’s original GA is now known as the simple
genetic algorithm (SGA).
● Other GAs use different:
○ Representations
○ Mutations
○ Crossovers
○ Selections mechanisms
● Applications:
○ Optimization and Search Problems
The Simple GA
● Has been subject of many (early) studies
○ Still often used as benchmark for novel GAs
● Shows many shortcomings, e.g.
○ Representation is too restrictive
○ Mutation & crossovers only applicable for bit-string & integer
representations
○ Selection mechanism sensitive for converging populations with
close fitness values
○ Generational population model (step 5 in SGA repr. cycle) can be
improved with explicit survivor selection
SGA technical summary
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
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
SGA operators: Point crossover
● Choose a random point on the two parents
● Split parents at this crossover point
● Create children by exchanging tails
● Pc typically in range (0.6, 0.9)0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Parents
Children
SGA operators: Mutation
● Alter each gene independently with a probability pm
● pm is called the mutation rate
○ Typically between 1/pop_size and 1/ chromosome_length
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 0 0 1
Child
Parent
SGA operators: Selection
● Main idea: better individuals get higher chance
○ Chances proportional to fitness
○ Implementation: roulette wheel technique
■ Assign to each individual a part of the roulette wheel
■ Spin the wheel n times to select n individuals
A
3/6 = 50%
B
1/6 =
17%
C
2/6 = 33%
fitness(A) = 3
fitness(B) = 1
fitness(C) = 2
N-Queen Problem
● N-Queen dates back to the 19th century (studied by
Gauss)
● Classical combinatorial problem, widely used as a
benchmark because of its simple and regular
structure.
● Problem involves placing N queen on a N x N
chessboard such that no queen can attack any other.
N-Queen Problem
This problem contains three constraints:
1. No two queens can share a same row.
2. No two queens can share a same column.
3. No two queens can share a same diameter.
N-Queen Problem: Cycle
Initialize Population
Parent Selection
Satisfy
Constraints
Children
Mutation
Insert Children
Select The Best
ThenElse
n + 1
generation
N-Queen Problem: Representation
1 4 2 3 3 1 4 2
N-Queen Problem: Representation
Genotypic space
Codification
Phenotypic space
Decodification
1 4 2 3
Chromosome
Gen
Alelo
N-Queen Problem: Fitness
[R1, R2, ..., Ri, Ri+1, ..., Rj, …, Rn]
i - Ri = j - Rj
o
i + Ri = j + Rj
|| Ri - Rj || = || i-j ||
N-Queen Problem: Parent Selection
1 2
3
5
6
7
10
9
8
4
10
1
4
5
6
9
7
3
9 4
4
9
1th
2th
N-Queen Problem: Crossover
1 4 2 3 3 1 4 2 1 4 4 2
Take a look at
● N-Queen report
● N-Queen source code at GitHub.
● Eiben, A. E. y Smith, J. E., (2015), Introduction to
Evolutionary Computing, Springer, 2da. Edición, ISBN:
978-3-540-40184-1
● Mitchell, M., (2014), An Introduction to Genetic
Algorithms, MIT Press
● Goldberg, D. E., (2007), Genetic Algorithms in Search,
Optimization, and Machine Learning, Addison-Wesley
Publishing Company, Inc., 2007, ISBN: 0201157675.
Fine, any question?

Contenu connexe

Tendances

Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
Luigi Ceccaroni
 
Selection in Evolutionary Algorithm
Selection in Evolutionary AlgorithmSelection in Evolutionary Algorithm
Selection in Evolutionary Algorithm
Riyad Parvez
 

Tendances (20)

Artificial intelligence(04)
Artificial intelligence(04)Artificial intelligence(04)
Artificial intelligence(04)
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Informed search
Informed searchInformed search
Informed search
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm ppt
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Particle swarm optimization
Particle swarm optimization Particle swarm optimization
Particle swarm optimization
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Ai 8 puzzle problem
Ai 8 puzzle problemAi 8 puzzle problem
Ai 8 puzzle problem
 
Agents in Artificial intelligence
Agents in Artificial intelligence Agents in Artificial intelligence
Agents in Artificial intelligence
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Basic operators in matlab
Basic operators in matlabBasic operators in matlab
Basic operators in matlab
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Computability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable FunctionComputability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable Function
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Greedy Algorithms
Greedy AlgorithmsGreedy Algorithms
Greedy Algorithms
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptx
 
Selection in Evolutionary Algorithm
Selection in Evolutionary AlgorithmSelection in Evolutionary Algorithm
Selection in Evolutionary Algorithm
 

Similaire à Evolutionary Computing - Genetic Algorithms - An Introduction

Local search algorithms6
Local search algorithms6Local search algorithms6
Local search algorithms6
yosser atassi
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
zamakhan
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
Raktim Halder
 

Similaire à Evolutionary Computing - Genetic Algorithms - An Introduction (20)

Introduction to Genetic Algorithms 2014
Introduction to Genetic Algorithms 2014Introduction to Genetic Algorithms 2014
Introduction to Genetic Algorithms 2014
 
Local search algorithms6
Local search algorithms6Local search algorithms6
Local search algorithms6
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Evolutionary algorithms
Evolutionary algorithmsEvolutionary algorithms
Evolutionary algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
0101.genetic algorithm
0101.genetic algorithm0101.genetic algorithm
0101.genetic algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.ppt
 
GA.pptx
GA.pptxGA.pptx
GA.pptx
 
Introduction to Evolutionary Computations. Akira Imada
Introduction to Evolutionary Computations. Akira ImadaIntroduction to Evolutionary Computations. Akira Imada
Introduction to Evolutionary Computations. Akira Imada
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktim
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptx
 
Introduction to Genetic Algorithms and Evolutionary Computation
Introduction to Genetic Algorithms and Evolutionary ComputationIntroduction to Genetic Algorithms and Evolutionary Computation
Introduction to Genetic Algorithms and Evolutionary Computation
 
RM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lectureRM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lecture
 
CI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdfCI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdf
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 

Plus de martinp

Sistemas de Recomendación de Información - Web Semáctica
Sistemas de Recomendación de Información - Web SemácticaSistemas de Recomendación de Información - Web Semáctica
Sistemas de Recomendación de Información - Web Semáctica
martinp
 
Extraction and Analysis System of Topics for Software History Reports
Extraction and Analysis System of Topics for Software History ReportsExtraction and Analysis System of Topics for Software History Reports
Extraction and Analysis System of Topics for Software History Reports
martinp
 
IA - Redes Neuronales
IA - Redes NeuronalesIA - Redes Neuronales
IA - Redes Neuronales
martinp
 
Algoritmos de Planning - Práctico Nro. 1
Algoritmos de Planning - Práctico Nro. 1Algoritmos de Planning - Práctico Nro. 1
Algoritmos de Planning - Práctico Nro. 1
martinp
 
The Deep Web
The Deep WebThe Deep Web
The Deep Web
martinp
 

Plus de martinp (11)

Sistemas de Recomendación de Información - Web Semáctica
Sistemas de Recomendación de Información - Web SemácticaSistemas de Recomendación de Información - Web Semáctica
Sistemas de Recomendación de Información - Web Semáctica
 
Extraction and Analysis System of Topics for Software History Reports
Extraction and Analysis System of Topics for Software History ReportsExtraction and Analysis System of Topics for Software History Reports
Extraction and Analysis System of Topics for Software History Reports
 
IA - Redes Neuronales
IA - Redes NeuronalesIA - Redes Neuronales
IA - Redes Neuronales
 
Algoritmos de Planning - Práctico Nro. 1
Algoritmos de Planning - Práctico Nro. 1Algoritmos de Planning - Práctico Nro. 1
Algoritmos de Planning - Práctico Nro. 1
 
The Deep Web
The Deep WebThe Deep Web
The Deep Web
 
Hofstede’s Cultural Dimensions
Hofstede’s Cultural DimensionsHofstede’s Cultural Dimensions
Hofstede’s Cultural Dimensions
 
Desarrollo de Software Orientado a Aspectos
Desarrollo de Software Orientado a AspectosDesarrollo de Software Orientado a Aspectos
Desarrollo de Software Orientado a Aspectos
 
Patrimonio dell'umanità in Italia
Patrimonio dell'umanità in ItaliaPatrimonio dell'umanità in Italia
Patrimonio dell'umanità in Italia
 
Int. a la Computación Evolutiva - Informe para cursada
Int. a la Computación Evolutiva - Informe para cursadaInt. a la Computación Evolutiva - Informe para cursada
Int. a la Computación Evolutiva - Informe para cursada
 
Software Libre/Código Abierto - Enunciado
Software Libre/Código Abierto - EnunciadoSoftware Libre/Código Abierto - Enunciado
Software Libre/Código Abierto - Enunciado
 
Software Libre/Código Abierto - Informe Final
Software Libre/Código Abierto - Informe FinalSoftware Libre/Código Abierto - Informe Final
Software Libre/Código Abierto - Informe Final
 

Dernier

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Dernier (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 

Evolutionary Computing - Genetic Algorithms - An Introduction

  • 1. Blue Trail Software Evolutionary Computing Genetic Algorithms An Introduction Martín Pacheco
  • 2. Overview of Topics 1. Biological inspiration 2. What is evolutionary computing (EC) 3. General outline of the evolutive algorithm (EA) 4. Genetic algorithm (GA) overview 5. SGA technical summary 6. SGA reproduction cycle 7. SGA operators 8. Practical Application Example: “It is not the strongest of the species that survives, nor the most intelligent, but the one most responsive to change.”
  • 3. Biological Inspiration ● To understand biological processes properly, we must first have an understanding of the cell ● Human bodies are made up of trillions of cells ● Each cell has a core structure (nucleus) that contains your chromosomes ● Additionally, each of our 23 chromosomes are made up of tightly coiled strands of deoxyribonucleic acid (DNA) The Origin of Species (1859)
  • 4. Biological Inspiration ● Reproduction involves recombination of genes from parents and then small amounts of mutation (errors) in copying ● The fitness of an organism is how much it can reproduce before it dies ● Here is an example of the passing of chromosomes within human reproduction
  • 5. What is evolutionary computing (EC) ● Evolution of species: ○ Natural selection ○ Genetic operators ● Biological sciences provide inspiration and terminology
  • 6. General Outline of EA Population Offspring Parents Parent selection Recombination Mutation Survivor selection Initialization Termination
  • 7. Genetic algorithm (GA) overview ● Originally developed by John Holland (1975). ● Genetic Algorithm’s have 2 essential components: ○ “Survival of the fittest” ○ Genetic Diversity ● The genetic algorithm (GA) is a search heuristic that mimics the process of natural evolution. ● Attributed features: ○ Not too fast
  • 8. Genetic algorithm (GA) overview ● Holland’s original GA is now known as the simple genetic algorithm (SGA). ● Other GAs use different: ○ Representations ○ Mutations ○ Crossovers ○ Selections mechanisms ● Applications: ○ Optimization and Search Problems
  • 9. The Simple GA ● Has been subject of many (early) studies ○ Still often used as benchmark for novel GAs ● Shows many shortcomings, e.g. ○ Representation is too restrictive ○ Mutation & crossovers only applicable for bit-string & integer representations ○ Selection mechanism sensitive for converging populations with close fitness values ○ Generational population model (step 5 in SGA repr. cycle) can be improved with explicit survivor selection
  • 10. SGA technical summary 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
  • 11. 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
  • 12. SGA operators: Point crossover ● Choose a random point on the two parents ● Split parents at this crossover point ● Create children by exchanging tails ● Pc typically in range (0.6, 0.9)0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Parents Children
  • 13. SGA operators: Mutation ● Alter each gene independently with a probability pm ● pm is called the mutation rate ○ Typically between 1/pop_size and 1/ chromosome_length 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 0 0 1 Child Parent
  • 14. SGA operators: Selection ● Main idea: better individuals get higher chance ○ Chances proportional to fitness ○ Implementation: roulette wheel technique ■ Assign to each individual a part of the roulette wheel ■ Spin the wheel n times to select n individuals A 3/6 = 50% B 1/6 = 17% C 2/6 = 33% fitness(A) = 3 fitness(B) = 1 fitness(C) = 2
  • 15. N-Queen Problem ● N-Queen dates back to the 19th century (studied by Gauss) ● Classical combinatorial problem, widely used as a benchmark because of its simple and regular structure. ● Problem involves placing N queen on a N x N chessboard such that no queen can attack any other.
  • 16. N-Queen Problem This problem contains three constraints: 1. No two queens can share a same row. 2. No two queens can share a same column. 3. No two queens can share a same diameter.
  • 17. N-Queen Problem: Cycle Initialize Population Parent Selection Satisfy Constraints Children Mutation Insert Children Select The Best ThenElse n + 1 generation
  • 19. N-Queen Problem: Representation Genotypic space Codification Phenotypic space Decodification 1 4 2 3 Chromosome Gen Alelo
  • 20. N-Queen Problem: Fitness [R1, R2, ..., Ri, Ri+1, ..., Rj, …, Rn] i - Ri = j - Rj o i + Ri = j + Rj || Ri - Rj || = || i-j ||
  • 21. N-Queen Problem: Parent Selection 1 2 3 5 6 7 10 9 8 4 10 1 4 5 6 9 7 3 9 4 4 9 1th 2th
  • 22. N-Queen Problem: Crossover 1 4 2 3 3 1 4 2 1 4 4 2
  • 23. Take a look at ● N-Queen report ● N-Queen source code at GitHub. ● Eiben, A. E. y Smith, J. E., (2015), Introduction to Evolutionary Computing, Springer, 2da. Edición, ISBN: 978-3-540-40184-1 ● Mitchell, M., (2014), An Introduction to Genetic Algorithms, MIT Press ● Goldberg, D. E., (2007), Genetic Algorithms in Search, Optimization, and Machine Learning, Addison-Wesley Publishing Company, Inc., 2007, ISBN: 0201157675.