You are on page 1of 24

GENETIC

ALGORITHMS

PRESENTED BY:
SURBHI JAIN
28/BCA/VIBS/2002
INTRODUCTION

Genetic Algorithms (GAs) are adaptive heuristic


search algorithm. The basic concept of GAs is
designed to simulate processes in natural system
necessary for evolution, specifically those that
follow the principles of survival of the fittest.
Survival of Fittest
Looking at the world around us, we see a staggering
diversity of life. All of these plants and creatures
have evolved, and continue evolving, over millions
of years. They have adapted themselves to a
constantly shifting and changing environment in
order to survive. Those weaker members of a species
tend to die away, leaving the stronger and fitter to
mate, create offspring and ensure the continuing
survival of the species. And it is upon these ideas
that genetic algorithms are based.
SEARCH SPACE
The Basic GAs Operators
After an initial population is randomly
generated, the algorithm evolves through
three operators:
1) selection which equates to survival of the
fittest;
2) crossover which represents mating between
individuals;
3) mutation which introduces random
modifications.
Selection operator
String Fitness Value Percentage

01001 5 19%

10000 12 46%

01110 9 35%
Fitness Function
Crossover Operator
By recombining portions of good individuals,
crossover process is likely to create even better
individuals
Mutation Operator
Genetic Algorithm Operators
Mutation and Crossover
Parent 1 1 0 1 0 1 1 1

Parent 2 1 1 0 0 0 1 1

Child 1 1 0 1 0 0 1 1

Child 2 1 1 0 0 1 1 0 Mutation
ALGORITHM
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
CONTD.

4. [Selection] Select two parent chromosomes


from a population according to their fitness (the
better fitness, the bigger chance to be selected) The
idea is to choose the better parents.
5. [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.
6. [Mutation] With a mutation probability mutate new
offspring at each locus (position in chromosome).
CONTD.

7. [Accepting] Place new offspring in a new


population
8. [Replace] Use new generated population for a
further run of algorithm
9. [Test] If the end condition is satisfied, stop, and
return the best solution in current population
10.[Loop] Go to step 2
Flowchart
Describe
Problem

Generate
Initial
Solutions

Step 1 Test: is initial Yes Stop


solution good enough?

No

Step 2 Select parents


to reproduce

Step 3 Apply crossover process


and create a set of offspring
Step 4
Step 5 Apply random mutation
EXAMPLE

THE MAZE PROBLEM


At each maze cell position the demonstration key is:
Arrow= present position and direction of facing
Black= wall
Blue = already visited maze cell
Grey = Maze cell not yet visited
For each combination of these three cells any gene solution provides
an action to move one square: either forward(0), turn left and move
one(1), turn right and move one(2), or turn around and move back
one(3).As there are three input cells whose state can each be
described by two bits (one set if wall, other bit set if already visited)
there are a total of six bits used as input to the genetic algorithm.
Each gene solution thus must store 2 to the power of 6 (=64)possible
decisions.
GENETIC ALGORITHM
APPLICATIONS
Application Areas
 Dynamic process control
 Induction of rule optimization
 Discovering new connectivity topologies
 Simulating biological models of behavior and evolution
 Complex design of engineering structures
 Pattern recognition
 Scheduling
 Transportation
 Layout and circuit design
 Telecommunication
 Graph-based problems
Representative Commercial
Packages
 Evolver (Excel Spreadsheet add-in)
 Generator (Excel add-in)
 Genetic Algorithm User Interface (GAUI)
 Sugal Genetic Algorithms Simulator
 OOGA (object-oriented GA for industrial use)
 XperRule Genasys (ES shell with an embedded
genetic algorithm)
Business Applications
 Schedule Assembly lines at Volvo Truck North
America
 Channel 4 Television (England) to schedule
commercials
 Driver scheduling in a public transportation system
 Job shop scheduling
 Assignment of destinations to sources
 Trading stocks
 Productivity in whisky-making is increased
 Often genetic algorithm hybrids with other AI methods
Genetic Algorithms in the
Market
 GenJam (short for Genetic Jammer) is
an interactive genetic algorithm that
learns to play jazz solos. It may well be
the only evolutionary algorithm that is a
"working musician.“
www.it.rit.edu/~jab/genjam.html
GENETIC
ALGORITHMS

QUESTIONS?

You might also like