You are on page 1of 2

Lab 8 Research:

Mutation
Mutation is done by swapping two random cities:
123456789 --> 123546789

Mutation

Normal random - a few cities are chosen and exchanged

Random, only improving - a few cities are randomly chosen and


exchanged only if they improve solution (increase fitness)

Systematic, only improving - cities are systematically chosen and


exchanged only if they improve solution (increase fitness)

Random improving - the same as "random, only improving", but before


this is "normal random" mutation performed

Systematic improving - the same as "systematic, only improving", but


before this is "normal random" mutation performed

None - no mutation

Breeding/crossover
Breeding is done by selecting a random range of cities from the first parent route,
and placing it into an empty child route (in the same range). Gaps are then filled in,
without duplicates, in the order they appear in the second parent route. For example:
parent1: 0123456789
parent1: 5487961320
start_pos = 0 (random)
end_pos = 4 (random)
unfilled child: 01234*****
filled child: 0123458796
Each number represents a city. Asterisks are unfilled.

Crossover

One point - part of the first parent is copied and the rest is taken in the
same order as in the second parent
Two point - two parts of the first parent are copied and the rest between is
taken in the same order as in the second parent
None - no crossover, offspring is exact copy of parents

Selection - We want to be constantly improving our populations overall fitness.


Selection helps us to do this by discarding the bad designs and only keeping the
best individuals in the population. There are a few different selection methods
but the basic idea is the same, make it more likely that fitter individuals will be
selected for our next generation.
Crossover - During crossover we create new individuals by combining aspects of
our selected individuals. We can think of this as mimicking how sex works in
nature. The hope is that by combining certain traits from two or more individuals
we will create an even 'fitter' offspring which will inherit the best traits from each
of it's parents.
Mutation - We need to add a little bit randomness into our populations' genetics
otherwise every combination of solutions we can create would be in our initial
population. Mutation typically works by making very small changes at random to
an individuals genome.

You might also like