0% found this document useful (0 votes)
18 views17 pages

AI L5 - Genetic Algorithms

Uploaded by

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

AI L5 - Genetic Algorithms

Uploaded by

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

7/24/2024

• Natural systems as guiding metaphors


• Humans have evolved (and continue to evolve)
• Charles Darwinian Evolution – 1859 over time….
• Theory of natural selection • We presume that prehistoric species of man
• It proposes that the plants and animals that exist today are the were less intelligent than we are.
result of millions of years of adaptation to the demands of the
environment
• As conditions on earth change, species
• Over time, the entire population of the ecosystem is said become extinct (e.g. the dinosaurs) and
to evolve other species emerge
• to contain organisms that, on average, are fitter than
those of previous generations of the population • Can we model this process and ”evolve”
new programs and even hardware?

1 2 3

• Evolutionary computation(EC) techniques abstract these


evolutionary principles into algorithms to search for
optimal solutions to a problem.
• Traditional search algorithms randomly or • heuristic method based on ‘ survival of the fittest ’
heuristically sample the search space (one solution
at a time) in the hopes of finding the optimal • useful when search space very large or too complex
• In a search algorithm solution.
• A number of possible solutions to a problem are available for analytic treatment
• Task is to find the best solution possible in a fixed amount of
time.
• The key aspect distinguishing an evolutionary • in each iteration (generation) possible solutions or
search algorithm from such traditional algorithms
is that it is population-based. individuals represented as strings of numbers
• For a search space with only a small number of possible
solutions, all the solutions can be examined in a
reasonable amount of time and the optimal one found.

• This exhaustive search, however, quickly becomes


impractical as the search space grows in size.

4 5 6

1
7/24/2024

Classes of Search Techniques Classes of Search Techniques


Search Techniques Genetic Algorithms
Search techniques
• The science that deals with the mechanisms
Calculus Base Guided random search Enumerative Calculus-based techniques Guided random search techniques Enumerative techniques responsible for similarities and differences in a species
Techniques techniqes Techniques is called Genetics.
Direct methods Indirect methods Evolutionary algorithms Simulated annealing Dynamic programming

Fibonacci Sort DFS Dynamic BFS Finonacci Newton Evolutionary strategies Genetic algorithms

Programming
Parallel Sequential • The concepts of Genetic Algorithms are directly derived
Tabu Search Hill Simulated Evolutionary from natural evolution.
Centralized Distributed Steady-state Generational
Climbing Anealing Algorithms
• In the early 70’s a person named John Holland
Genetic Genetic introduced the concept of genetic algorithms (Holland,
Programming Algorithms 7 1975).

7 8 9

The Genetic Algorithm Genetic Algorithms

A genetic algorithm maintains a population of


■ Directed search algorithms based on the mechanics of candidate solutions for the problem at • The Cell
biological evolution
hand, • Every animal/human cell is a complex of
■ Developed by John Holland, University of Michigan many “small” factories that work together.
(1970’s) and makes it evolve by
To understand the adaptive processes of natural systems
To design artificial systems software that retains the robustness of
iteratively applying • The center of all this is the cell nucleus.
• The genetic information is contained in the
a set of stochastic operators
natural systems
■ Provide efficient, effective techniques for optimization cell nucleus
and machine learning applications
■ Widely-used today in business, scientific and
engineering circles 1
1

Introduction to Genetic
Algorithms

10 11 12

2
7/24/2024

The Main Stages of GA


Genetic Algorithms
• Another biological based method.
• Based on the Darwin’s theory. (Evolution of The main stages of GA are:
• Chromosomes species).
• All the genetic information gets stored in the chromosomes. 1. Creation of a population of individuals
• Based on: survival of the most fittest individual
• The chromosomes are divided into several parts called genes. • Key steps: reproduction, survive 2. Evaluation of individual’s performance in the given environment
• Genes code the properties of species i.e., the characteristics of • Try to simulate life. 3. Selection of best individuals
an individual. • Individual = solution 4. Genetic manipulation on the selected individuals
• The possibilities of the genes for one property are called • Environment = problem
allele and a gene can take different alleles.
• For example, there is a gene for eye color, and all the different ■ At stage 1, a population of individuals is created, and
possible alleles are black, brown, blue and green then the population is modified through a cycle of
stages 2,…, 4

15

13 14 15
http://ib-poland.virtualave.net/ee/genetic1/3geneticalgorithms.htm

• Like in real life, the process is not done on the solution • The idea is that you represent the solution to your
(individual), but on its representation (chromosome). problem in a structured way
• the simplest is a string
• this is not necessarily the best representation, but it is simple to explain
• Therefore we don’t use knowledge we have about the
problem.

• Very often, based on strings. (but not always), like biological • We then build a population of random solutions and
chromosomes. let them ”breed” using genetic operators
• at each generation we apply ” survival of the
fittest ” and hopefully better and better solutions evolve
over time
• the best solutions are more likely to survive and more likely
to produce even better solutions

16 17 18

3
7/24/2024

..Stages of GA ..Stages of GA Termination of GA

 Each cycle of GA produces a new population of  The cycles run while the performance is improved
1. Population individuals with better performance  Once the performance becomes stable (e.g., all roses
of individuals  In the example of selecting red roses, this means became red), the GA terminates
that the proportion of red roses becomes greater
and grey less (because the grey roses are not Termination
4. Genetic 2. Evaluation of

Performance
selected for the next seed) point
Manipulation performance

3. Selection of Best
best individuals Cycles

19 20 21

19 20 21

Definitions for GA ..Definitions for GA Types of Genetic Manipulation

 A population is often named generation  Individuals can be coded into bit-strings which are  Typically, genetic manipulation on selection of
 A new population of individuals, created as a result also named chromosomes individuals consists of 2 operators: crossover
of the genetic manipulation, is often called offspring  The bits are often named genes and mutation
 The performance of individuals in the given  An example of string (chromosome) consisting of 5  The crossover operator recombines bits of two
environment are also called fitness bits (genes): selected strings at the crossover point
 For example, if our aim is select horses for racing,  The crossover points are assigned randomly among
the performance (fitness) can be evaluated in terms 10010
the bits of strings
of speed
 One or more crossover points can be given

22 23 24

22 23 24

4
7/24/2024

Candidate representation Candidate representation Candidate representation


example example
■ We want to encode candidates in a way that makes mutation ■ Let’s say we want to represent a rule for classifying bikes as ■ The candidate will be a bit string of length 10, because we
and crossover easy. mountain bikes or hybrid, based on these attributes*: have 10 possible attribute values.
■ The typical candidate representation is a binary string. This – Make (Bridgestone, Cannondale, Nishiki, or Gary Fisher) ■ Let’s say we want a rule that will match any bike that is made
string can be thought of as the genetic code of a candidate – – Tire type (knobby, treads) by Bridgestone or Cannondale, has treaded tires, and has
thus the term “genetic algorithm”! – Handlebar type (straight, curved) straight handlebars. This rule could be represented as
– Other representations are possible, but they make 1100011011:
– Water bottle holder (Boolean)
crossover and mutation harder.
■ We can encode a rule as a binary string, where each bit
represents whether a value is accepted.
Make Tires Handlebars Water bottle
Make Tires Handlebars Water bottle 1 1 0 0 0 1 1 0 1 1
B C N G K T S C Y N
B C N G K T S C Y N
*Bikes scheme used with permission from Mark Maloof.

25 26 27

25 26 27

..Crossover ..Mutation An Example of Using GA

 An example of the recombination of 2 parent  The mutation operator alters one or more
strings into 2 offspring when the crossover point is bits at the randomly selected positions of ■ Assume a function f(x) = x2 which should be
given after the 3rd bit; the string maximised in the interval 0 ≤ x ≤ 31
 So that the 4th and 5th bits are recombined  An example of mutation at the 4th bit is ■ In this example the fitness function is function
below f(x) itself - the larger its values, the better its
Crossover point fitness
■ The number of bits in strings must be equal to
Parents: 100 10 010 00 Parent: 10010 5 because x varies between 0 and 31

Offspring: 100 00 010 10 Offspring: 10000

28 29 30

28 29 30

5
7/24/2024

Table 1: Fitness of strings in initial ..An Example


..An Example population 1

# String String x f(x)  To create the first generation of individuals, let us


■ Then the number of combinations of bits is 25 clone string 2 whose fitness is maximal, 576
= 32 1 01101 13 169
 Select the other 2 strings, #4 and #1, whose fitness
■ To maximise function f(x), let us define 4 2 11000 24 576 values are equal to 361 and 169, respectively
strings with the random values of x shown on  Let these 4 strings form the selection to make a
the next slide 3 01000 8 64 genetic manipulation as shown on the next slide

4 10011 19 361

Sum 1170

31 32 33

31 32 33

..An Example Table 2: Strings in population 2


..An Example

 To make genetic manipulation on the selection, let


# String Partner Crossing New
us randomly assign a partner-string to each string ■ Now we can calculate the fitness for each
string # population
as follows: string in population 2 as shown in Table 3 on
◼ #1 and #2
1 01101 2 0110[1] 01100 the next slide
◼ #2 and #1 ■ From this Table we see that the sum of the new
2 11000 1 1100[0] 11001
◼ #3 and #4 fitness values is now equal to 1754
◼ #4 and #3
3 *1100 4 11[000] 11011 ■ As the sum in population 1 is 1170, we can
 The crossover points are randomly assigned at 0 conclude that the individuals in population 2
points 5, 5, 3, 3, respectively, as depicted in Table on fit better than those in population 1
4 10011 3 10[011] 10000
the next slide

34 35 36

34 35 36

6
7/24/2024

Table 3: Fitness of strings in


population 2 ..An Example Why Genetic Algorithms
Work?
# String String x f(x)
■ In the same manner we can run new cycles ■ To understand how genetic algorithms work,
1 01100 12 144 while the fitness increases
Holland has introduced schemata (plural of schema)
■ A schema is a string in which the sign * represents
2 11001 25 625 ■ When the fitness becomes stable, the GA any value of bits
terminates, and an individual with the best ■ For example, schema 1011*001*0 matches the
3 01011 27 729 fitness is assigned as the resultant solution following (2*2 = 4) string variants:
– 1011000100
4 10000 16 256 – 1011000110
– 1011100100
– 1011100110
Sum 1754

37 38 39

37 38 39

Definitions of Schemata Genetic Algorithms


• Holland was concerned with manipulating • Crossover
• we cut two solutions at a random point and switch the respective
strings of binary digits using natural selection
■ The length of a schema is the distance between parts
the first and last defined bits in the schema
and genetic- inspired techniques. • Typically a value of 0.7 for crossover probability gives good
results.
■ For example, the length of the following
schemata is 4: • Mutation
– **10111* • we randomly change a bit in the solution
1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 • occasional mutation makes the method much less sensitive to the
– 1*0*1**
original population and also allows ”new” solutions to emerge
– 11111 • Typically, a value between 0.001 and 0.01 for mutation
A 16-bit binary string of an artificial chromosome
– 1***1 robability is used.
13

40

40 41 42

7
7/24/2024

Stochastic operators

■ Selection replicates the most successful


solutions found in a population at a rate
a 1 a2 a3 a4 a5
b1 b2 b3 b4 b5 b6 a1 a2 a3 a4 a5 a6
bb1 2 b3 b4 b5 b6 proportional to their relative quality
a6
  ■ Recombination decomposes two distinct
solutions and then randomly mixes their parts to
form novel solutions
a1 b1 a3 a4 a5 a6 ■ Mutation randomly perturbs a candidate
solution
a1 a2 a3 a4 b5 b6 b1 b2 b3 b4 a5 a6 4
5

Introduction to Genetic
Algorithms

43 44 45

The GA Cycle of Reproduction Evaluation of Individuals


Evaluation
children modified ■ Adaptability – ”fitness”
reproduction modification
evaluated children ■ Relates to the objective function value for a
modified
parents
children DOP
children evaluation
■ Fitness is maximized
population evaluation
evaluated children ■ Used in selection (”Survival of the fittest”)
deleted
■ The evaluator decodes a chromosome and assigns it ■ Often normalized
members
a fitness measure
f : S →  0,1
discard ■ The evaluator is the only link between a classical GA
and the problem it is solving

4
6

47 48

46 47 48

8
7/24/2024

Genetic Operators GA - Evolution


Chromosome Modification
■ Manipulates chromosomes/solutions ■ N generations of populations
■ Mutation: Unary operator ■ For every step in the evolution children
modification
– Inversions – Selection of individuals for genetic operations modified children
■ Crossover: Binary operator – Creation of new individuals (reproduction)
– Mutation
■ Modifications are stochastically triggered
– Selection of individuals to survive
■ Operator types are:
■ Fixed population size M – Mutation
– Crossover (recombination)

49 50 51

49 50 51

GA - Mutation Mutation: Local Modification


1 2 3 4 5 6 7
Before: (1 0 1 1 0 1 1 0) Crossover: Recombination
.
1 0 1 0 0 1 0 After: (1 0 1 0 0 1 1 0) P1 (0 1 1 0 1 0 0 0) (0 1 1 1 1 0 1 0) C1

P2 (1 1 0 1 1 0 1 0) (1 1 0 0 1 0 0 0) C2
Before: (1.38 -69.4 326.44 0.1)
1 2 3 4 5 6 7 After: (1.38 -67.5 326.44 0.1) Crossover is a critical feature of genetic
1 0 1 1 0 1 0
■ Causes movement in the search space algorithms:
(local or global) – It greatly accelerates search early in evolution of a
population
■ Restores lost information to the population – It leads to effective combination of schemata
(subsolutions on different chromosomes)

52 53 54

52 53 54

9
7/24/2024

GA - Evolution Population
Reproduction
Generation X Generation X+1
children population
reproduction
Mutation
parents
Chromosomes could be:
population – Bit strings (0101 ... 1100)
– Real numbers (43.2 -33.1 ... 0.0 89.2)
Parents are selected at random with selection – Permutations of element (E11 E3 E7 ... E1 E15)
chances biased in relation to chromosome – Lists of rules (R1 R2 R3 ... R22 R23)
evaluations Selection – Program elements (genetic programming)
M=10 Cross-over – ... any data structure ...

55 56 57

55 56 57

Classical GA: Binary chromosomes GA - Classical Crossover (1-


GA – Classical Crossover
point) ■ Arbitrary (or worst) individual in the population is changed
■ One parent is selected based on fitness
1 2 3 4 5 6 7 with one of the two offspring (e.g. the best)
1 0 1 0 0 1 0 ■ The other parent is selected randomly ■ Reproduce as long as you want
1 2 3 4 5 6 7 ■ Random choice of cross-over point ■ Can be regarded as a sequence of almost equal populations
0 1 1 1 0 0 1
1 2 3 4 5 6 7
Parent 1 ■ Alternatively:
■ Functional optimization 1 0 1 0 0 1 0
– One parent selected according to fitness
– Chromosome corresponds to a binary encoding of a
1
0
2
1
3
1
4
1
5
0
6
0
7
1
Parent 2 – Crossover until (at least) M offspring are created
real number - min/max of an arbitrary function – The new population consists of the offspring
Cross-over point
■ COP, TSP as an example ■ Lots of other possibilities ...
1 2 3 4 5 6 7
Child 1 ■ Basic GA with classical crossover and mutation often works
– Binary encoding of a solution 1 0 1 1 0 0 1

– Often better with a more direct representation well


1 2 3 4 5 6 7
(e.g. sequence representation) 0 1 1 0 0 1 0 Child 2

58 59 60

58 59 60

10
7/24/2024

GA – Standard Reproduction An Abstract Example


Deletion
Plan
■ Fixed population size
population
■ Standard cross-over
– One parent selected according to fitness discarded members
– The other selected randomly
– Random cross-over point discard Distribution of Individuals in Generation 0
– A random individual is exchanged with one of the offspring
■ Mutation ■ Generational GA:
– A certain probability that an individual mutate entire populations replaced each iteration
– Random choice of which gene to mutate
– Standard: mutation of offspring ■ Steady-state GA:
a few members replaced each generation Distribution of Individuals in Generation N

61 62 63

61 62 63

Genetic Algorithms (GA) OVERVIEW


Simple Genetic Algorithm
{
initialize population;
evaluate population; ■ A class of probabilistic optimization algorithms
while TerminationCriteriaNotSatisfied ■ Inspired by the biological evolution process
{
■ Uses concepts of “Natural Selection” and “Genetic
select parents for reproduction;
Inheritance” (Darwin 1859)
perform recombination and mutation;
■ Originally developed by John Holland (1975)
evaluate population;
}
}
6
6
65

Introduction to Genetic
Algorithms

64 65 66

11
7/24/2024

GA overview (cont)

• We then see how good the solutions are, using an evaluation


■ Particularly well suited for hard problems where function • We then select the surviving population
• often this is a heuristic, especially if it is computationally
little is known about the underlying search space expensive to do a complete evaluation • Likelihood of survival is related in some way to your score on
■ Widely-used in business, science and engineering • the final population can then be evaluated more deeply to decide the fitness function
on the best solution • the most common technique is roulette wheel selection

• Note we always keep the best solution so far (maybe this is


the best we can do, so we don’t want to lose this solution)

6
7

Introduction to Genetic
Algorithms

67 68 69

TSP Example: 30 Cities Solution i (Distance = 941)


TSP30 (Performance = 941)

120
120

100
100

80
80

y 60
y 60

40
40

20
20

0
0 0 10 20 30 40 50 60 70 80 90 100
0 10 20 30 40 50 60 70 80 90 100
x
x

70 71 72

12
7/24/2024

Best Solution (Distance = 420)


Solution j(Distance = 800) Solution k(Distance = 652)
44 42
62 TSP30 (Performance = 800) TSP30 (Performance = 652) 38 TSP30 Solution (Performance = 420)
69 35
120 120 120
67 26
78 21
64 100 100 35 100
62 32
54 7 80
80 80
42 38
50 46
40 y 60 y 60 44 y 60
40 58
38 40 60 40
40
21 69
35 76
20 20
67 20 78
60 71
60 0 69 0
0 10 20 30 40 50 60 70 80 90 100 0 0 10 20 30 40 50 60 70 80 90 100
40 0 10 20 30 40 50 60 70 80 90 100 67
42 x 62 x
x
50 84
99 94

73 74 75

Problem Definition Step 1: Initialization


First, we generate an initial population of chromosomes. Each chromosome Step 3: Crossover
The Traveling Salesman Problem involves represents a possible tour. Let's assume a population size of 4. We perform crossover between selected parents to create offspring. Assume C1 and
finding the shortest possible route that visits each city exactly C3 are selected as parents, and C2 and C4 are selected as another pair of parents.
Chromosome Tour Distance We'll use partially matched crossover (PMX).
once and returns to the origin city. Let's consider a small
example with 5 cities. C1 A-B-C-D-E-A 27 Crossover between C1 (A-B-C-D-E) and C3 (A-D-E-B-C):
Cities and Distances C2 A-C-B-E-D-A 38 Assume the crossover points are between the second and fourth cities:
We'll define 5 cities (A, B, C, D, E) and their distances in a C3 A-D-E-B-C-A 31 •Parent 1: A-B-C-D-E
matrix form: •Parent 2: A-D-E-B-C
C4 A-E-D-C-B-A 36

A B C D E Offspring:
Step 2: Selection •Offspring 1: A-B-E-D-C
A 0 2 9 10 7 •Offspring 2: A-D-C-B-E
We use roulette wheel selection to choose parents for reproduction. The
B 2 0 6 4 3 probability of selecting a chromosome is inversely proportional to its tour
C 9 6 0 8 5 distance. Crossover between C2 (A-C-B-E-D) and C4 (A-E-D-C-B):
Assume the crossover points are between the first and third cities:
D 10 4 8 0 6
Fitness •Parent 1: A-C-B-E-D
E 7 3 5 6 0 Chromosome Distance Probability
(1/Distance) •Parent 2: A-E-D-C-B
C1 27 0.037 0.364
Offspring:
C2 38 0.026 0.255 •Offspring 3: A-C-D-E-B
C3 31 0.032 0.291 •Offspring 4: A-E-B-C-D
C4 36 0.028 0.290

76 77 78

13
7/24/2024

Step 6: Termination
Step 4: Mutation
We repeat the selection, crossover, mutation, and replacement steps for a predefined
We apply mutation to introduce diversity. Assume a mutation rate of 0.1 (10%). number of generations or until a stopping criterion is met (e.g., a solution with a satisfactory
We'll swap two cities in each chromosome.
Offspring 1 (A-B-E-D-C) with mutation between cities B and D:
fitness is found).
Generation 0
Overview of Performance
•A-D-E-B-C
Offspring 2 (A-D-C-B-E) with mutation between cities C and B: C1: A-B-C-D-E-A (27)
TSP30 - Overview of Performance
•A-D-B-C-E C2: A-C-B-E-D-A (38)
Offspring 3 (A-C-D-E-B) with mutation between cities C and E: C3: A-D-E-B-C-A (31) 1800

•A-E-D-C-B C4: A-E-D-C-B-A (36) 1600

Offspring 4 (A-E-B-C-D) with mutation between cities B and D: Selected parents: C1, C3, C2, C4 1400
•A-E-D-C-B Crossover: 1200
e
Parent 1: A-B-C-D-E, Parent 2: A-D-E-B-C → Offspring 1: A-B-E-D-C, Offspring 2: A-D-C-B-E c 1000
n
Step 5: Replacement a
Parent 1: A-C-B-E-D, Parent 2: A-E-D-C-B → Offspring 3: A-C-D-E-B, Offspring 4: A-E-B-C-D t
s
i 800
We replace the old population with the new offspring. D

Mutation: 600

Offspring 1: A-B-E-D-C → A-D-E-B-C 400


Chromosome Tour Distance Offspring 2: A-D-C-B-E → A-D-B-C-E 200

O1 A-D-E-B-C-A 35 Offspring 3: A-C-D-E-B → A-E-D-C-B 0 Best


Offspring 4: A-E-B-C-D → A-E-D-C-B 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Worst
O2 A-D-B-C-E-A 33 Generations (1000)
Average
O3 A-E-D-C-B-A 38 Generation 1
O1: A-D-E-B-C-A (35)
O4 A-E-D-C-B-A 38 O2: A-D-B-C-E-A (33)
O3: A-E-D-C-B-A (38)
O4: A-E-D-C-B-A (38)

79 80 81

• To find the maximum Integer Binary code • Suppose that the size of the chromosome population N is 6, • The GA creates an initial population of chromosomes by filling six
1 0001
the crossover probability pc equals 0.7 and the mutation 4-bit strings with randomly generated ones and zeros.
value of the function 2 0010
probability pm equals 0.001, the fitness function in our
(15x-x2), where 3 0011
example is defined by Chromosome Chromosome Decoded Chromosome Fitness ratio
4 0100 label string integer fitness %
parameter x varies 5 0101 f(x) = (15x-x2)
X1 1100 12 36 16.5
between 0 and 15. 6 0110

Assumption: x takes 7 0111 X2 0100 4 44 20.2


8 1000
only integer values. 9 1001 X3 0001 1 14 6.4
10 1010
11 1011
X4 1110 14 14 6.4
12 1100 X5 0111 7 56 25.7
13 1101
14 1110 X6 1001 9 54 24.8
15 1111

82 83 84

14
7/24/2024

• Last column in the previous table shows the ratio • To select a chromosome for mating, a random
of the individual chromosome fitness to the number (between 0 and 100) is generated.
populations total fitness. •Each member of the
1 2 population is given a slice • The roulette wheel is spun and when the arrow
of the roulette wheel comes to rest on one of the segments, the
• According to the example, chromosomes X5 and 3 •The better the fitness, the corresponding chromosome is selected.
X6 have a pretty good chance of being selected bigger the slice
for mating, while X3 and X4 have a poor chance. •We then spin the wheel - • In the current case, the wheel is spun six times.
if your number comes up • The first two spins might select, X6 and X2;
4
you survive to the next
• Second two spins might select X1 and X5;
• Roulette selection wheel is the most commonly generation!
• The last two spins might select X2 and X5.
used chromosome selection technique.

85 86 87

GA: Hybridization and


Parallelization Issues for GA Practitioners
■ GAs strengths and weaknesses:
• Genetic algorithms assure the continous improvement of the
– Domain independence
average fitness of the population, and after many generations
(typically several hundreds), the population evolves to a near ■ Hybridization ■ Basic implementation issues:
optimal solution. – Seed good individuals in the initial population – Representation
• In the current case, 0111 and 1000. – Combine with other Metaheuristics to improve some solutions – Population size, mutation rate, ...
■ Parallelization – Selection, deletion policies
– Fitness-evaluation – Crossover, mutation operators
– Sub-populations ■ Termination Criteria
– The Island Model ■ Performance, scalability
■ Solution is only as good as the evaluation function
(often hardest part)

89 90

88 89 90

15
7/24/2024

Benefits of Genetic Algorithms


Benefits of Genetic Algorithms (cont.) When to Use a GA
■ Concept is easy to understand
■ Many ways to speed up and improve a GA- ■ Alternate methods are too slow or overly
■ Modular, separate from application complicated
based application as knowledge about the
■ Supports multi-objective optimization ■ Need an exploratory tool to examine new
problem domain is gained approaches
■ Good for “noisy” environments ■ Easy to exploit previous or alternate solutions ■ Problem is similar to one that has already been
■ Always an answer; answer gets better with successfully solved by using a GA
■ Flexible building blocks for hybrid applications
time ■ Want to hybridize with an existing method
■ Substantial history and range of use ■ Benefits of the GA technology meet key problem
■ Inherently parallel; easily distributed
requirements

91 92 93

91 92 93

Some GA Application Types GA: Overview Genetic Algorithms


Domain Application Types
Control gas pipeline, pole balancing, missile evasion, pursuit ■ Important characteristics:
■ Bit-string encoding is inappropriate for many combinatorial
Design semiconductor layout, aircraft design, keyboard – Population av solutions problems. In particular, crossover may lead to infeasible or
configuration, communication networks
Scheduling manufacturing, facility scheduling, resource allocation – Domain independence – encoding meaningless solutions.
■ Pure GAs are usually not powerful enough to solve hard
trajectory planning
– Structure is not exploited combinatorial problems.
Robotics
– Inherent parallell – schema, vocabulary ■ Hybrid GAs use some form of local search as mutation
Machine Learning designing neural networks, improving classification operator to overcome this.
algorithms, classifier systems – Robust
Signal Processing filter design
– Good mechanisms for intensification
Game Playing poker, checkers, prisoner’s dilemma – Lacking in diversification
Combinatorial set covering, travelling salesman, routing, bin packing,
graph colouring and partitioning
Optimization
94 95 96

94 95 96

16
7/24/2024

Memetic Algorithms (1) Memetic Algorithms (2) Summary of Lecture

■ Basically, a Memetic Algorithm is a GA with Local Search as ■ The experience is that GAs do not necessarily perform well in ■ Local Search
improvement mechanism some problem domains – Short summary
– Also known under different names ■ Using Local Search in addition to the population mechanisms ■ Genetic Algorithms
– An example of hybridization proves to be an improvement
– Population based Metaheuristic
■ A meme is a unit of cultural information transferable from ■ In a sense this elevates the population search to a search – Based on genetics:
one mind to another among locally optimal solutions, rather than among any
■ Mutation
– Sounds like gene: the unit carrying inherited information
solution in the solution space
■ Combination of chromosomes from parents
– Hybridization: Memetic Algorithm

97 98 99

97 98 99

• Interesting idea, parallelism • Slow (blind search). • It’s a big family, with a lot of possibilities
• Very easy to use • No proof (or hints) about the quality of the solution. • Easy to use
• Need no knowledge about the solution • Sometimes difficult to use them efficiently. • Efficiency ?
• Could be efficient • Tradeoff between mutation and crossover? • Areas: Graph problems (Graph coloring),

• Tradeoff between speed and quality? optimization (Networks, schedulings etc)


• How important is each parameter?

100 101 102

17

You might also like