SlideShare a Scribd company logo
WIX3001
Soft Computing
Lecture 6: Principles of Genetic Algorithms
Dr. Liew Wei Shiung
FSKTM Block B 2-22
liew.wei.shiung.phd@um.edu.my
Principles of Genetic Algorithms
• Genetic Algorithm variants
• Genetic Programming
Genetic Algorithm variants
• Messy GA
• Adaptive GA
• Parallel GA
• Independent Sampling GA
• Real-Coded GA
GA Glossary
Chromosome
A set of genes / parameters representing a complete solution to a
problem being optimized.
Population A set of chromosomes.
Fitness Function
The function used for evaluating how well a chromosome solves the
optimization problem. Outputs a fitness score.
Generation
A complete cycle where the population of chromosomes is evaluated,
and a new population is created using selection, reproduction, and
mutation.
Selection / Rejection
Selects or rejects chromosomes from the population. Elitism is when the
best chromosomes carry over to the next generation.
Reproduction Combining two or more chromosomes to create a new chromosome.
Mutation Changing the value of one or more genes in a chromosome.
Convergence When the GA finds the global optimum or the fitness no longer improves.
Messy GA
• Traditional GA: fixed-order genes.
• Messy GA: variable-length, position-independent genes.
• Each gene is appended with an index.
• Positions of the genes in the chromosome can be swapped without
changing the meaning of the chromosome.
• Why?
• Irregular-length solutions.
Messy GA: Representation
Messy GA: Genetic Operations
• Crossover: cut and splice
Messy GA: Potential Problems
• Over-Specification: more than one gene with the same index.
• Positional preference: choose the first or last.
• Performance preference: choose the best.
• Under-Specification: one or more indices are missing.
• Random.
• Optimization.
Adaptive GA
• Traditional GA: fixed population size, crossover rate, mutation
rate.
• Adaptive GA: variable population size, crossover rate, mutation
rate.
• Example: Mutation+ if population converges; Mutation- if population
diverges.
• Why?
• Control the rate of searching and rate of convergence.
• Exploration: unknown solution space.
• Exploitation: known solution space.
Adaptive GA: How to Detect Convergence?
• Criterion: Max fitness – Avg. fitness
Convergence Divergence
Selection
++
Keep more local
optima from known
areas
--
Keep more solutions
from unknown areas
Crossover
++
Look for more
unknown areas
--
Narrow down
searching in known
areas
Mutation
++
Look for more
unknown areas
--
Narrow down
searching in known
areas
Adaptive GA
Parallel GA
• Parallel Chromosomes
• Fitness test multiple chromosomes simultaneously.
• Parallel Populations (i.e. Island Model)
• Optimize multiple populations simultaneously.
• Limited migration between populations.
• Diversity.
Independent-Sampling GA
• Traditional GA: search solution space by generating offspring
with selection, crossover, mutation.
• ISGA: search solution space using independent sampling.
• Independent sampling phase.
• Breeding phase.
• Why?
• Better population diversity.
• Adaptive mechanism.
• Fewer parameters to tune.
Independent-Sampling GA
• Population initialization and fitness testing as normal.
• Independent Sampling:
• Generate offspring chromosome, one gene at a time, by independent
sampling.
• Evaluate new offspring. If fitness score is higher than the lowest
population fitness, replace the low-fitness chromosome with the offspring.
• Breeding:
• Select two parent chromosomes (i.e. using tournament fitness).
• Generate offspring using crossover, and then fitness test.
• Replace parents if offspring have higher fitness.
Real-Coded GA
• Traditional GA: uses binary genes.
• Real-coded GA: uses real floating value genes.
• Why?
• Better precision.
• Solve optimization problems with continuous variables and solution space.
Genetic Algorithm variants
GA Variant Advantages Disadvantages
Messy
- Overlapping genes can handle problems
with high epistasis
- Non-binary encoding scheme
- Each gene can contribute to multiple traits, which can
be difficult to interpret
Adaptive
- Adapt to changing problem landscapes
- More efficient than fixed-parameter GAs
in some cases
- Requires a self-adaptive mutation rate, which can be
complex to implement
Parallel
- Speed up the optimization process by
utilizing multiple processors or machines
- Handle large-scale optimization problems
- Requires a suitable parallelization technique and
infrastructure
- Synchronization and communication overheads may
affect performance
Independent
Sampling
- Reduce the risk of getting stuck in local
optima
- Increase the diversity of the final solution
- Requires multiple independent runs, which can be time-
consuming
- Final solution may not be as good as that of a single run
Real-Coded
- Handle continuous variables and improve
search efficiency for certain problems
- Produce more accurate solutions than
binary-coded GAs for certain problems
- Requires a larger search space, which can be
computationally expensive
- More complex to implement than binary-coded GAs
Genetic Programming: Principles
• GP uses natural evolution principles for different problem
domains.
1. Multiple individuals form a population. Individuals can reproduce.
2. Reproduction transfers traits from parents to offspring.
3. Many factors affect the survival of individuals.
4. Natural selection favours fit individuals.
• GP evolves computer programs to solve problems, i.e. automatic
programming.
Genetic Programming: Program
• Program using tree structure
representation.
• Each node can be:
1. Arithmetic function (i.e. addition, subtraction).
2. Logical function (i.e. AND, NOT).
3. Terminal: input variables, constants.
4. Tree structure: depth, complexity, branches.
Genetic Programming
1. Initialize population of computer programs.
2. Fitness test each program.
a) Performance: does the program run? How well does it solve the
problem?
b) Complexity: how big is the program? How long does it run?
3. Create new offspring program:
a) Selection: choose two or more parent programs.
b) Crossover: randomly swap nodes between parents.
c) Mutation: change a node to another type of node.
d) Architecture: modify the architecture of the offspring.
Genetic Programming: Characteristics
• Human-competitive.
• High-return.
• Routine.
• Machine intelligence.
Genetic Programming: Characteristics
• Human-competitive:
Genetic Programming: Characteristics
• High-Return: described using “artificial-to-intelligence ratio”.
• Artificial: how much of the program is automated.
• Intelligence: how much of the program requires human
intervention.
• Examples:
• Deep Blue chess computer.
• High A: very good at playing chess.
• High I: requires years of development by a dedicated team.
• Results: low A-to-I ratio.
Genetic Programming: Characteristics
• Routine: how well does the program handle new problems intra-
domain, and inter-domain, with minimal human intervention.
• Machine Intelligence: how well does the program fulfil the three
principles inspired by Turing:
• Logic-driven search: search algorithms, constraints, rule-based systems.
• Cultural search: previously acquired knowledge is stored and used for
solving future problems, i.e. knowledge-based expert systems.
• Genetic or evolutionary search: evolve newer, better solutions from
existing solutions.

More Related Content

Similar to WIX3001 Lecture 6 Principles of GA.pptx

Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
Atul Khanna
 
0101.genetic algorithm
0101.genetic algorithm0101.genetic algorithm
0101.genetic algorithm
Ahmad Almubarrok
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
DurgeshPratapSIngh8
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptx
waqasjavaid26
 
Introduction to Genetic Algorithms 2014
Introduction to Genetic Algorithms 2014Introduction to Genetic Algorithms 2014
Introduction to Genetic Algorithms 2014
Aleksander Stensby
 
BGA.pptx
BGA.pptxBGA.pptx
Ga presentation
Ga presentationGa presentation
Ga presentation
ziad zohdy
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithm
ritambharaaatre
 
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning SystemAnalysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Harshal Jain
 
GENETIC ALGORITHM ( GA )
GENETIC ALGORITHM ( GA )GENETIC ALGORITHM ( GA )
GENETIC ALGORITHM ( GA )
abuamo
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
Amna Saeed
 
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Madhav Mishra
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
Nipun85
 
AI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.pptAI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.ppt
HotTea
 
Genetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptGenetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.ppt
Fitnessfreaksfam
 
Genetic-Algorithms forv artificial .ppt
Genetic-Algorithms forv artificial  .pptGenetic-Algorithms forv artificial  .ppt
Genetic-Algorithms forv artificial .ppt
neelamsanjeevkumar
 
Genetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.pptGenetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.ppt
neelamsanjeevkumar
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
ssuser2e437f
 
Evolutionary Design of Swarms (SSCI 2014)
Evolutionary Design of Swarms (SSCI 2014)Evolutionary Design of Swarms (SSCI 2014)
Evolutionary Design of Swarms (SSCI 2014)
Benjamin Bengfort
 
Metaheuristics
MetaheuristicsMetaheuristics
Metaheuristics
ossein jain
 

Similar to WIX3001 Lecture 6 Principles of GA.pptx (20)

Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 
0101.genetic algorithm
0101.genetic algorithm0101.genetic algorithm
0101.genetic algorithm
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
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 2014
Introduction to Genetic Algorithms 2014Introduction to Genetic Algorithms 2014
Introduction to Genetic Algorithms 2014
 
BGA.pptx
BGA.pptxBGA.pptx
BGA.pptx
 
Ga presentation
Ga presentationGa presentation
Ga presentation
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithm
 
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning SystemAnalysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
 
GENETIC ALGORITHM ( GA )
GENETIC ALGORITHM ( GA )GENETIC ALGORITHM ( GA )
GENETIC ALGORITHM ( GA )
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
 
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
 
AI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.pptAI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.ppt
 
Genetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptGenetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.ppt
 
Genetic-Algorithms forv artificial .ppt
Genetic-Algorithms forv artificial  .pptGenetic-Algorithms forv artificial  .ppt
Genetic-Algorithms forv artificial .ppt
 
Genetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.pptGenetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.ppt
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
 
Evolutionary Design of Swarms (SSCI 2014)
Evolutionary Design of Swarms (SSCI 2014)Evolutionary Design of Swarms (SSCI 2014)
Evolutionary Design of Swarms (SSCI 2014)
 
Metaheuristics
MetaheuristicsMetaheuristics
Metaheuristics
 

Recently uploaded

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 

Recently uploaded (20)

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 

WIX3001 Lecture 6 Principles of GA.pptx

  • 1. WIX3001 Soft Computing Lecture 6: Principles of Genetic Algorithms Dr. Liew Wei Shiung FSKTM Block B 2-22 liew.wei.shiung.phd@um.edu.my
  • 2. Principles of Genetic Algorithms • Genetic Algorithm variants • Genetic Programming
  • 3. Genetic Algorithm variants • Messy GA • Adaptive GA • Parallel GA • Independent Sampling GA • Real-Coded GA
  • 4. GA Glossary Chromosome A set of genes / parameters representing a complete solution to a problem being optimized. Population A set of chromosomes. Fitness Function The function used for evaluating how well a chromosome solves the optimization problem. Outputs a fitness score. Generation A complete cycle where the population of chromosomes is evaluated, and a new population is created using selection, reproduction, and mutation. Selection / Rejection Selects or rejects chromosomes from the population. Elitism is when the best chromosomes carry over to the next generation. Reproduction Combining two or more chromosomes to create a new chromosome. Mutation Changing the value of one or more genes in a chromosome. Convergence When the GA finds the global optimum or the fitness no longer improves.
  • 5. Messy GA • Traditional GA: fixed-order genes. • Messy GA: variable-length, position-independent genes. • Each gene is appended with an index. • Positions of the genes in the chromosome can be swapped without changing the meaning of the chromosome. • Why? • Irregular-length solutions.
  • 7. Messy GA: Genetic Operations • Crossover: cut and splice
  • 8. Messy GA: Potential Problems • Over-Specification: more than one gene with the same index. • Positional preference: choose the first or last. • Performance preference: choose the best. • Under-Specification: one or more indices are missing. • Random. • Optimization.
  • 9. Adaptive GA • Traditional GA: fixed population size, crossover rate, mutation rate. • Adaptive GA: variable population size, crossover rate, mutation rate. • Example: Mutation+ if population converges; Mutation- if population diverges. • Why? • Control the rate of searching and rate of convergence. • Exploration: unknown solution space. • Exploitation: known solution space.
  • 10. Adaptive GA: How to Detect Convergence? • Criterion: Max fitness – Avg. fitness Convergence Divergence Selection ++ Keep more local optima from known areas -- Keep more solutions from unknown areas Crossover ++ Look for more unknown areas -- Narrow down searching in known areas Mutation ++ Look for more unknown areas -- Narrow down searching in known areas
  • 12. Parallel GA • Parallel Chromosomes • Fitness test multiple chromosomes simultaneously. • Parallel Populations (i.e. Island Model) • Optimize multiple populations simultaneously. • Limited migration between populations. • Diversity.
  • 13. Independent-Sampling GA • Traditional GA: search solution space by generating offspring with selection, crossover, mutation. • ISGA: search solution space using independent sampling. • Independent sampling phase. • Breeding phase. • Why? • Better population diversity. • Adaptive mechanism. • Fewer parameters to tune.
  • 14. Independent-Sampling GA • Population initialization and fitness testing as normal. • Independent Sampling: • Generate offspring chromosome, one gene at a time, by independent sampling. • Evaluate new offspring. If fitness score is higher than the lowest population fitness, replace the low-fitness chromosome with the offspring. • Breeding: • Select two parent chromosomes (i.e. using tournament fitness). • Generate offspring using crossover, and then fitness test. • Replace parents if offspring have higher fitness.
  • 15. Real-Coded GA • Traditional GA: uses binary genes. • Real-coded GA: uses real floating value genes. • Why? • Better precision. • Solve optimization problems with continuous variables and solution space.
  • 16. Genetic Algorithm variants GA Variant Advantages Disadvantages Messy - Overlapping genes can handle problems with high epistasis - Non-binary encoding scheme - Each gene can contribute to multiple traits, which can be difficult to interpret Adaptive - Adapt to changing problem landscapes - More efficient than fixed-parameter GAs in some cases - Requires a self-adaptive mutation rate, which can be complex to implement Parallel - Speed up the optimization process by utilizing multiple processors or machines - Handle large-scale optimization problems - Requires a suitable parallelization technique and infrastructure - Synchronization and communication overheads may affect performance Independent Sampling - Reduce the risk of getting stuck in local optima - Increase the diversity of the final solution - Requires multiple independent runs, which can be time- consuming - Final solution may not be as good as that of a single run Real-Coded - Handle continuous variables and improve search efficiency for certain problems - Produce more accurate solutions than binary-coded GAs for certain problems - Requires a larger search space, which can be computationally expensive - More complex to implement than binary-coded GAs
  • 17. Genetic Programming: Principles • GP uses natural evolution principles for different problem domains. 1. Multiple individuals form a population. Individuals can reproduce. 2. Reproduction transfers traits from parents to offspring. 3. Many factors affect the survival of individuals. 4. Natural selection favours fit individuals. • GP evolves computer programs to solve problems, i.e. automatic programming.
  • 18. Genetic Programming: Program • Program using tree structure representation. • Each node can be: 1. Arithmetic function (i.e. addition, subtraction). 2. Logical function (i.e. AND, NOT). 3. Terminal: input variables, constants. 4. Tree structure: depth, complexity, branches.
  • 19.
  • 20. Genetic Programming 1. Initialize population of computer programs. 2. Fitness test each program. a) Performance: does the program run? How well does it solve the problem? b) Complexity: how big is the program? How long does it run? 3. Create new offspring program: a) Selection: choose two or more parent programs. b) Crossover: randomly swap nodes between parents. c) Mutation: change a node to another type of node. d) Architecture: modify the architecture of the offspring.
  • 21.
  • 22. Genetic Programming: Characteristics • Human-competitive. • High-return. • Routine. • Machine intelligence.
  • 24. Genetic Programming: Characteristics • High-Return: described using “artificial-to-intelligence ratio”. • Artificial: how much of the program is automated. • Intelligence: how much of the program requires human intervention. • Examples: • Deep Blue chess computer. • High A: very good at playing chess. • High I: requires years of development by a dedicated team. • Results: low A-to-I ratio.
  • 25. Genetic Programming: Characteristics • Routine: how well does the program handle new problems intra- domain, and inter-domain, with minimal human intervention. • Machine Intelligence: how well does the program fulfil the three principles inspired by Turing: • Logic-driven search: search algorithms, constraints, rule-based systems. • Cultural search: previously acquired knowledge is stored and used for solving future problems, i.e. knowledge-based expert systems. • Genetic or evolutionary search: evolve newer, better solutions from existing solutions.

Editor's Notes

  1. Messy: designed to handle problems with a high degree of epistasis, which occurs when the effect of a gene depends on the presence or absence of other genes. This is achieved by allowing overlapping genes, so that a single gene can contribute to multiple traits. Adaptive: dynamically adjusts its parameters during the optimization process. This allows the algorithm to adapt to changes in the problem landscape or to different problem instances. Hybrid: combines multiple optimization techniques. For example, it can use both local search methods and global search methods to explore the problem space more efficiently. Hybrid GA can also combine genetic algorithm with other optimization methods such as simulated annealing or gradient descent. Parallel: uses multiple processors or machines to perform the optimization process simultaneously. This can greatly reduce the time required to find the optimal solution. Parallel GA can be implemented using various approaches such as master-slave, island model, or cellular model. ISGA: uses independent runs to search for the optimal solution. Each run is performed independently, and the best individual from each run is selected as the final solution. This approach can reduce the risk of getting stuck in local optima, as different runs may explore different parts of the problem space. RCGA: handle problems with continuous variables. It represents each individual as a vector of real values instead of binary strings. Real-Coded GA uses real-valued crossover and mutation operators, and may use gradient-based methods to improve the search efficiency in some cases.
  2. In a “classical” GA, the genes are encoded in a fixed order. The meaning of a single gene is determined by its position inside the chromosome. What happens if the coding is chosen such that couplings occur between distant genes? Messy GAs try to overcome this difficulty by using a variable-length, position-independent coding. The key idea is to append an index to each gene which allows identifying its position. A gene, therefore, is no longer represented as a single allele value and a fixed position, but as a pair of an index and an allele. Since with the help of the index we can identify the genes uniquely, genes may be swapped arbitrarily without changing the meaning of the string. Messy Genetic Algorithms are a powerful optimization technique that can tackle problems with irregular or variable-length structures. They overcome some of the limitations of traditional GAs by using variable-length chromosomes, gene expression, template-based crossover, specialized mutation operators, and a coarse-to-fine search strategy. These features enable mGAs to effectively explore complex search spaces and find high-quality solutions to challenging problems.
  3. With appropriate genetic operations, which also change the order of the pairs, the GA could possibly group coupled genes together automatically.
  4. Owing to the free arrangement of genes and the variable length of the encoding, we can, however, run into problems, which do not occur, in a simple GA. First of all, it can happen that there are two entries in a string, which correspond to the same index but have conflicting alleles. The most obvious way to overcome this “over-specification” is positional preference – the first entry, which refers to a gene, is taken. This problem of “under specification” is more complicated and its solution is not as obvious as for over-specification. One approach could be to check all possible combinations and to take the best one (for k missing genes, there are 2k combinations). With the objective to reduce this effort, Goldberg et al. have suggested to use so-called competitive templates for finding specifications for k missing genes. It is nothing else than applying a local hill climbing method with random initial value to the k missing genes.
  5. Adaptive GAs are those whose parameters, such as the population size, the crossing over probability, or the mutation probability, are varied while the GA is running. A simple variant could be the following: The mutation rate is changed according to changes in the population – the longer the population does not improve, the higher the mutation rate is chosen. Vice versa, it is decreased again as soon as an improvement of the population occurs.
  6. K2=K4=0.5; prevent the GA from getting stuck at a local optimum. K1=K3=1.0; ensures that all solutions with a fitness value less than or equal to global optimum compulsorily undergo crossover. The probability of crossover decreases as the fitness value approaches global optimum
  7. It has been established that GA’s efficiency to find optimal solution is largely determined by the population size. With a larger population size, the genetic diversity increases, and so the algorithm is more likely to find a global optimum. A large population requires more memory to be stored; it has also been proved that it takes a longer time to converge. If n is the population size, the convergence is expected after nlog(n) function evaluations.
  8. Fitness is usually multi-objective. Fitness is also run multiple times under different test cases. Mutation in GP can involve one or more of the following changes: Replace a function node with another function that has the same arity (number of arguments). Replace a terminal node (variable or constant) with another terminal. c. Replace a function node with a terminal node, effectively pruning the subtree rooted at that function node. d. Replace a terminal node with a function node, requiring the addition of a new subtree rooted at the new function node.