SlideShare a Scribd company logo
1 of 17
CS1103
GROUP MEMBERS

DARAKSHAN ANJUM
11060819-008
IQRA AMJAD
11060819-041

CS1103
GENETIC ALGORITHM

CS1103
INTRODUCTION

•Genetic

algorithms are a part of evolutionary
computing
•Genetic algorithms operate on a set of possible
solutions.
CONTI...
solutions found by an algorithm can be good, poor, or
infeasible .
A way to specify how good that solution is.
- by assigning a fitness value [or just fitness] to the
solution.
Can you guess, genetic algorithms are inspired by
Darwin's theory about evolution?
- solution to a problem solved by genetic algorithms is
evolved.

Introduction

5
DESCRIPTION
- Algorithm is started with a set of solutions
called population.
- Solutions from one population are taken and used
to form a new population.
. Solutions which are selected to form new solutions
are selected
- according to their fitness
- the more suitable they are the more chances they
have to reproduce.
6
CONTI...
-This is repeated until some condition (for example
number of populations or improvement of the best
solution) is satisfied.

7
WORKING OF GA
1. [Start] Generate random population of n
chromosomes (suitable solutions for the problem) .
2. [Fitness] Evaluate the fitness f(x) of each
chromosome x in the population .
3. [New population] Create a new population by
repeating following steps until the new population is
complete
8
CONTI...
[Selection] Select two parent chromosomes from a
population according to their fitness (the better fitness, the
bigger chance to be selected)
[Crossover] With a crossover probability cross over the
parents to form a new offspring (children). If no crossover
was performed, offspring is an exact copy of parents.
[Mutation] With a mutation probability mutate new
offspring at each locus (position in chromosome).
[Accepting] Place new offspring in a new population

9
CONTI...
4. [Replace] Use new generated population for a
further run of algorithm
5. [Test] If the end condition is satisfied, stop, and
return the best solution in current population
6. [Loop] Go to step 2

CS1104-11

S-R Latch

10
GA OPERATORS
1. Crossover
2. Mutation
Encoding of chromosome
Chromosome 1 :

1101100100110110

Chromosome 2 :

1101111000011110

CS1104-11

S-R Latch

11
CONTI...
CROSSOVER:
Crossover can then look like this ( | is the crossover
point):
Chromosome 1
Chromosome 2

:
:

11011 | 00100110110
11011 | 11000011110

Offspring 1
Offspring 2

:
:

11011|11000011110
11011 |00100110110

CS1104-11

S-R Latch

12
CONTI…
MUTATION:
After a crossover is performed, mutation take place.
Original offspring 1
Original offspring 2

:
:

1101111000011110
1101100100110110

Mutated offspring 1
Mutated offspring 2

:
:

1100111000011110
1101101100110110

13
GA EXAMPLE

14
15
16
Ai presentation

More Related Content

Similar to Ai presentation

Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Ujjawal
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
Nandhini S
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
Nipun85
 

Similar to Ai presentation (20)

GA.pptx
GA.pptxGA.pptx
GA.pptx
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by Example
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Darwin's theory of evolution
Darwin's theory of evolutionDarwin's theory of evolution
Darwin's theory of evolution
 
Flowchart of ga
Flowchart of gaFlowchart of ga
Flowchart of ga
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Ga
GaGa
Ga
 
Genetic Algorithm
Genetic Algorithm Genetic Algorithm
Genetic Algorithm
 
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
 
Soft computing06
Soft computing06Soft computing06
Soft computing06
 
A Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its ApplicationsA Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its Applications
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
 
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
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Ai presentation

  • 4. INTRODUCTION •Genetic algorithms are a part of evolutionary computing •Genetic algorithms operate on a set of possible solutions.
  • 5. CONTI... solutions found by an algorithm can be good, poor, or infeasible . A way to specify how good that solution is. - by assigning a fitness value [or just fitness] to the solution. Can you guess, genetic algorithms are inspired by Darwin's theory about evolution? - solution to a problem solved by genetic algorithms is evolved. Introduction 5
  • 6. DESCRIPTION - Algorithm is started with a set of solutions called population. - Solutions from one population are taken and used to form a new population. . Solutions which are selected to form new solutions are selected - according to their fitness - the more suitable they are the more chances they have to reproduce. 6
  • 7. CONTI... -This is repeated until some condition (for example number of populations or improvement of the best solution) is satisfied. 7
  • 8. WORKING OF GA 1. [Start] Generate random population of n chromosomes (suitable solutions for the problem) . 2. [Fitness] Evaluate the fitness f(x) of each chromosome x in the population . 3. [New population] Create a new population by repeating following steps until the new population is complete 8
  • 9. CONTI... [Selection] Select two parent chromosomes from a population according to their fitness (the better fitness, the bigger chance to be selected) [Crossover] With a crossover probability cross over the parents to form a new offspring (children). If no crossover was performed, offspring is an exact copy of parents. [Mutation] With a mutation probability mutate new offspring at each locus (position in chromosome). [Accepting] Place new offspring in a new population 9
  • 10. CONTI... 4. [Replace] Use new generated population for a further run of algorithm 5. [Test] If the end condition is satisfied, stop, and return the best solution in current population 6. [Loop] Go to step 2 CS1104-11 S-R Latch 10
  • 11. GA OPERATORS 1. Crossover 2. Mutation Encoding of chromosome Chromosome 1 : 1101100100110110 Chromosome 2 : 1101111000011110 CS1104-11 S-R Latch 11
  • 12. CONTI... CROSSOVER: Crossover can then look like this ( | is the crossover point): Chromosome 1 Chromosome 2 : : 11011 | 00100110110 11011 | 11000011110 Offspring 1 Offspring 2 : : 11011|11000011110 11011 |00100110110 CS1104-11 S-R Latch 12
  • 13. CONTI… MUTATION: After a crossover is performed, mutation take place. Original offspring 1 Original offspring 2 : : 1101111000011110 1101100100110110 Mutated offspring 1 Mutated offspring 2 : : 1100111000011110 1101101100110110 13
  • 15. 15
  • 16. 16