You are on page 1of 49

E VOLUTION

V
O
L
U
T
I
O
N
GENETIC A
R
LGORITHMS
Y

T
E
C
H
N
GENET I C PROGRAMMING
Q
U
E
A presentation by Anna, Seyi, Mahdi and Silvano
S MSC Computing and Design
UEL
EVOLU TION

MSC Computing and Design


UEL
Evolution in Biology

• Evolution as the Development of the Individual (17th century)


Refers to the original meaning of evolution (from the Latin evolutio, unrolling) – as the unfolding of
the parts and organs of an embryo to reveal a preformed body plan.

• Evolution as the Transformation of Populations between Generations (19th century)


Transformation of a species or transformation of the features of organisms.

•Transformation and Descent with


Modification” (1859 onwards)
Focus was placed on genes as
fundamental to the evolutionary process.

Attention was paid not only to the


concept of evolution but also to the
mechanisms of evolutionary change
within populations.

MSC Computing and Design


UEL
Development of Evolutionary Thought

MSC Computing and Design


UEL
MSC Computing and Design
UEL
MSC Computing and Design
UEL
How does Evolution Work?
Natural Selection and Hereditary(Genetic)Variation
Natural Selection:

• acts as a feedback mechanism: individuals better fitted to the environment survive.


• those variations in the genotype that increase an organism‟s chances of survival and procreation are
preserved and multiplied from generation to generation at the expense of less advantageous ones.
• operates on a phenotypic level, favoring or discriminating against expressed characteristics.
• is quantified by a measure called Darwinian fitness or relative fitness. Fitness in this sense is the
relative probability that a hereditary characteristic will be reproduced.

Hereditary variation entails two mechanisms:


•The spontaneous mutation of one variant into another.
• The sexual process that recombines those variants to form
a multitude of variations.

Genotype – the genotype comprises the


entire complex of genes inherited from both
parents. The genotype determines the
hereditary potentials and limitations of an
individual.

Phenotype - All the observable characteristics of an


organism, such as shape, size, colour, and behaviour,
that result from the interaction of its genotype with the
environment.
MSC Computing and Design
UEL
Elements of Heredity
• Heredity – Transmission of traits from
parents to offspring through genes.

• Gene – A functional unit of hereditary


information that occupies a fixed
position (locus) on a chromosome.

• Allele - any one of two or more


genes that may occur alternatively at a
given site (locus) on a chromosome. All
genetic traits are the result of the
interactions of alleles.

• DNA(deoxyribonucleic acid) - DNA


codes genetic information for the
transmission of inherited traits. The four
nucleotide bases of DNA, named
adenine, cytosine, guanine, and
thymine, are represented by the letters
A, C, G, and T, respectively.

• Chromosome – a part of the cell that


carries hereditary information in the
form of genes. Every species has a
characteristic number of
chromosomes.

MSC Computing and Design


UEL
Sexual Recombination
Each member of the parental generation
transmits only half its genes to the offspring.
Different offspring of the same parents
receive different combinations of genes.
Thus new genotypes are created.

Recombination:
•occurs randomly in nature .
• is enhanced by the phenomenon of
crossing over.
• acts to ensure constant variability: no two
daughter cells are identical, nor are any
identical in genetic content to the parent
cell

Cross-over:
Two chromosomes are lined up next to
each other and cut across somewhere
along their length. The two cut ends are
then swapped and glued back onto the
opposite end of the chromosome.

MSC Computing and Design


UEL
Mutation
Occasionally “mistakes,” or mutations, occur in the DNA
molecule during replication (because of rearrangement of
the DNA within the cell or the DNA not being copied exactly
before two cells divide) so that daughter cells differ from the
parent cells in the sequence or in the amount of DNA.

Gene mutations :
•Are random with no respect to adaptation and independent
of any possible consequences.
•Newly arisen mutations are more likely to be harmful than
beneficial to their carriers.
•Mutations can be beneficial if environments change
drastically because mutation provides each generation with
many new genetic variations.

MSC Computing and Design


UEL
Variation in Populations
The gene pool is the sum total of all the genes and combinations of genes that occur in population of
organisms of the same species.
Genetic drift is a random change in the gene pool of a small population that is caused by a
sampling “error “in the selection process of which genes of the parents an offspring inherits.
Gene flow, also called gene migration, is the introduction of genetic material (by interbreeding) from
one population of a species to another, thereby changing the composition of the gene pool of the
receiving population.
Natural selection keeps the disorganizing effects of mutation, genetic drift and gene flow in check
because it multiplies beneficial mutations and eliminates harmful ones. In extreme changes in the
environment, however, genetic drift and gene flow provide better options for populations‟ evolution.

Species and Speciation


Species is a collection of populations that differ
genetically from one another. And are
reproductively isolated (by physical impossibility to
interbreed or by geographical separation).

Speciation is the processes that account for the


development of different species.

MSC Computing and Design


UEL
Evolution: Outcomes

Adaptation is process by which an animal or plant species becomes fitted to its environment; It is
the result of natural selection‟s acting upon heritable variation.

Co evolution is the process of reciprocal evolutionary change that


occurs between pairs of species or among groups of species as they
interact with one another. The activity of each species that participates
in the interaction applies selection pressure to the others. The
relationship can be antagonistic (predator-prey) or co-operative
(pollinators (bees) and plants)

Еxtinction is the dying out or termination of a species. Extinction


occurs when species are diminished because of environmental forces or
because of evolutionary changes in their members. Many species have
become extinct because of human destruction of their natural
environments.

MSC Computing and Design


UEL
Evolution and Architecture
A shift in Evolution: The new role of Humans

“…humans exhibit genetic variation and are subject to natural selection, the two fundamental
conditions for evolution to occur. But in humans, biological evolution has transcended itself,
opening up a new mode of evolution: adaptation by technological manipulation of the
environment. Organisms adapt to the environment by changing their genetic constitution over the
generations to suit the demands of the environment. Humans have developed the capacity to
adapt to hostile environments by modifying the environments according to the needs of
their genes.”Francisco Ayala

MSC Computing and Design


UEL
Evolutionary architecture and Nature

Staircase Sagrada Familia, Gaudi Arches Casa Batlo Seashell (up)


Whale Rib Cage
(opposite)
Evolution operates without pre-knowledge of what’s to come (without
design) – therefore for evolutionary design we must be clear in our
intentions but blind to the eventual outcome of the process we are
creating.

The discussion of the blueprint:


• The architect‟s blueprint for a set of plans
• The blueprint in nature (DNA) as set of instructions, which are
dependent on a particular environmental context for their interpretation.

Evolutionary architecture and Nature:


• Non-evolutionary approach: (using the phenotype) – using nature‟s forms
and structures (morphology)
• Evolutionary approach (genotype): borrow the logic of nature‟s
morphological processes (morphogenesis) MSC Computing and Design
UEL
Evolutionary Architecture: Easy to be Tricked

Designed by Patrick Marsilli, the Dome House a mechanical structure that allows it to rotate 360
degrees, thereby maximizing sun absorption by the roof mounted solar panels. While this building
responds to its environment, it is not evolutionary as it avoids the social factor.

MSC Computing and Design


UEL
Evolutionary architecture

Important points:

• The concept must be driven by process not by object (by generating rules not by form)

• The concept must also be generic and universal thus capable of being expressed in a variety of
structures and spatial configurations in response to different environments.

• The architect is seen as a designer of hierarchical systems (not of a static building).

• Focus not on fixed geometry but on development of a language(vocabulary or syntax: implies


rules) – not be mistaken for shape grammars or the “Palladian Syntax”

• Focus away from optimization – not perfect solution, just good enough

MSC Computing and Design


UEL
EVOLU TIONARY
TECHNIQUES
Evolutionary Algorithm
Genetic Algorithm

Evolutionary
computation

Evolutionary Programming
Genetic programming
MSC Computing and Design
UEL
Inspired by and based upon evolution in nature

Images by Michel-Hansmeyer

The algorithms use an


analogy with natural
INSTRUCTIONS
evolution to perform
search by evolving
PROCESS
solutions to problems.
MSC Computing and Design
UEL
Computer COMPUTER
Aided DESIGN
Design

MSC Computing and Design


UEL
EVOLUTIONARY Techniques

“There are a variety of New computer techniques that enable problems to be


solved by successive improvements and developments. This is done by
measuring a given performance and selecting the best solutions which
represent a small improvement and reject the others. Only a small
quality of variation is required!” John Frazer

MSC Computing and Design


UEL
Evolution of
The term evolution in relation
solutions is not
explicitly specified to EC is the process.
in an EA.

EVOLUTIONARY
COMPUTATION

Computers are
It is a search
not instructed to
method evolve anything.

MSC Computing and Design


UEL
Evolutionary biology
Improve quality

Improve speed

Evolutionary
computation
Reduce cost of designing

Improve productivity
Computer science

•Instead of typically working with one solution in the search space, evolutionary algorithms consider a
large collection or population of solutions at once

•It is the search algorithms that define a computational problem in terms of search, where the search
space is filled with all the possible solutions to the problem and a point in that space defines a solution

MSC Computing and Design


UEL
Evolutionary
computation
is all about
search Example below is of genetic algorithmic
search

MSC Computing and Design


UEL
From Evolutionary Algorithm to Genetic Algorithms

Evolutionary algorithms (EAs) are search methods that take their inspiration from natural selection
and survival of the fittest in the biological world. EAs differ from more traditional optimization techniques
in that they involve a search from a "population" of solutions, not from a single point.

Where Evolutionary Algorithms focus on the solution space, Genetic algorithms differ as they look at the
search space. Genetic algorithms are a particular class of Evolutionary algorithms (EA) that use
techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover.

MSC Computing and Design


UEL
Evolutionary computing structure

MSC Computing and Design


UEL
GENETIC ALGORITHM
MSC Computing and Design
UEL
What is an algorithm?

A: Step by step list of instructions that need to be


followed to solve a problem.

e.g. a recipe is a type of algorithm as it gives a list of


ingredients that are needed to make a dish and the
steps that need to be followed.

MSC Computing and Design


UEL
Genetic algorithms are a class of evolutionary algorithms that use ideas inspired
by evolution to find optimised solutions to search problems

selection – inheritance – crossover – mutation

MSC Computing and Design


UEL
How it began?

The idea of evolutionary computing was introduced in the 1960s


by I. Rechenberg in his work “Evolution strategies”. His idea was
then developed by other researchers.

Genetic Algorithms (GAs) were invented by John Holland in the


1970s and then developed by him and his students and
colleagues. This lead to Holland‟s book “Adaption in Natural and
Artificial Systems” published in 1975.

John Holland, The father of Genetic Algorithms

MSC Computing and Design


UEL
What can genetic algorithms do?

They optimise. They can find better answers to a


question, but not find new answers.

Given the definition of a table, they might create a better


table but they‟ll never give you a chair.

MSC Computing and Design


UEL
How do Algorithms work?

Biology Lesson

When two organisms mate they share their genes.


The resultant offspring may end up having half the
genes from one parent and half from the other.
This process is called recombination (or
crossover).

Sometimes a gene may be mutated. Normally this


mutated gene will not affect the development of the
phenotype but very occasionally it will be
expressed in the organism as a completely new
trait.

The fitness of the organism is measured by the


success of the organism in its life.

Genetic Algorithms (GAs) are a way of solving


problems by mimicking the same process mother
nature uses. They use the same combination of
selection, crossover and mutation to evolve a
solution to a problem.

MSC Computing and Design


UEL
1. An algorithm is started with a set of
solutions (represented by
chromosomes) called population.
Solutions from one population are
taken and used to form a new
population 2. This is motivated by
a hope, that the new
population will be
better than the old
one

How do Algorithms work?

3. Solutions which are selected to


form new solutions (offspring) are
selected according to their
fitness-the more suitable the
more chances they have to
reproduce

MSC Computing and Design


UEL
Outline of Basic Genetic 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

1: [Selection] Select two parent chromosomes from a population according to their fitness
(the better the fitness, the bigger chance to be selected)

2 : [Crossover] With a crossover probability cross over the parents to form a new offspring
(children).

If no crossover is performed, offspring is an exact copy of parents.

3 : [Mutation] With a mutation probability mutate new offspring at each locus (position in
chromosome).

4 : [Accepting] Place new offspring in a new population

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

5: Loop Go to step 2
MSC Computing and Design
UEL
INITIAL POPULATION

SELECTION

MATING

CROSSOVER

MUTATION

NO
TERMINATE

YES Simplified flow chart of a Genetic Algorithm


MSC Computing and Design
UEL
Encoding of a chromosome

Encoding of a chromosome

To use a genetic algorithm to solve a problem, a way must be found to encode potential solutions
to a problem that can be stored in the computer. This could be as a string of real numbers, or as
more typically the case, a binary bit string. This object is a genome (or chromosome).

An example of a piece of chromosome could look like this:

Chromosome 1 1101100100110110
Chromosome 2 1101111000011110

The genetic algorithm creates a population of genomes then applies crossover and mutation to
the individuals in the population to generate new individuals.
It uses various selection criteria so that it picks the best individuals for mating (and subsequent
crossover). Your objective function determines how „good‟ each individual is.

The genetic algorithm then creates a population of solutions and applies genetic operators such as
mutation and crossover to evolve the solutions in order to find the best one(s).

MSC Computing and Design


UEL
Selection – Survival of the fittest!

Parents are selected according to their fitness. The better the chromosomes are, the more chances
they have of being selected.

There are many methods how to select the best chromosomes, for example roulette wheel selection,
Boltzman selection, tournament selection, rank selection, steady state selection and some others.

e.g. Roulette wheel selection method

MSC Computing and Design


UEL
Crossover
This is simply the chance that two chromosomes will swap their bits. Crossover is performed by
selecting a random gene along the length of the chromosome and swapping all the genes after
that point.

Chromosome 1 11011 | 00100110110


Chromosome 2 11011 | 11000011110

Offspring 1 11011 | 11000011110


Offspring 2 11011 | 00100110110

Mutation

After crossover mutation takes place. This is the chance for a bit in the chromosome to be flipped.
Mutation changes randomly the new offspring.

e.g. 0 becomes 1, 1 becomes 0


Original offspring 1 1101111000011110
Original offspring 2 1101100100110110

Mutated offspring 1 1100111000011110


Mutated offspring 2 1101101100110110
MSC Computing and Design
UEL
Putting it into practice
Best: IQQte=Ygqem# (152)
Best: Crmt`!qrya+6 (148)
Best: 8ufxp+Rigfm* (140)
Best: b`hpf"woljh[ (120)
Best: b`hpf"woljh4 (81)
Best: b`hpf"woljh" (63)
Best: Kdoit!wnsk_! (24)
Best: Kdoit!wnsk_! (24)
Best: Idoit!wnsk_! (22)
Best: Idoit!wnsk_! (22)
Best: Idoit!wnsk_! (22)
Best: Idoit!wnsk_! (22)
Best: Ifknm!vkrlf? (17)
Best: Ifknm!vkrlf? (17)
Best: Gfnio!wnskd$ (14)
Best: Ffnjo!wnskd$ (14)
Best: Hflio!wnskd$ (11)
Best: Hflio!wnskd$ (11)
Best: Kflkn wosld" (8)
Best: Ifmmo workd" (6)
Best: Hfljo wosld" (5)
Best: Hflmo workd" (4)
Best: Hflmo workd" (4)
Best: Hflmo workd" (4)
Best: Iflmo world! (3)
Best: Iflmo world! (3)
Best: Hflmo world! (2)
Best: Hflmo world! (2)
Best: Hflko world! (2)
Best: Hflko world! (2)
Best: Hdllo world! (1)
Best: Hfllo world! (1)
Best: Hfllo world! (1) The GA has the following characteristics:
Best: Helko world! (1) Population Size:2048
Best: Hfllo world! (1)
Best: Hfllo world! (1) Mutation (%):25
Best: Hfllo world! (1) Elitism (%):10
Best: Hello world! (0)
MSC Computing and Design
UEL
APPLICATION OF GENETIC ALGORTITHMS

1. Automotive Design 2. Engineering Design 3. Robotics

4. Biometric Invention 5. Trip, Traffic & Shipment 6. Encryption & encoding


Routing
GENETIC PROGRAMMING

MSC Computing and Design


UEL
Genetic Programming John Koza
Consulting professor
Department of Electrical
Engineering
School of Engineering,
Genetic 1999 – April 2010
Programming Evolutionary .
(GP) Algorithms (EA)

Evolutionary computation?

Evolutionary
Evolutionary Genetic
Programming
Strategies Algorithms (GA)
(EP)

Genetic programming provides a way to successfully conduct the search for a computer program in the
space of computer programs.
MSC Computing and Design
UEL
Genetic Programming structure

MSC Computing and Design


UEL
Genetic programming follows the principles of Darwinian Evolution
Natural selection acts on genetic variation
Natural selection is the process by which traits become more or less by conferring a survival advantage to
common in a population due to consistent effects upon the survival those individuals harbouring a particular
mutation that tends to favour a changing
or reproduction of their bearers. It is a key mechanism of evolution. environmental condition. These individuals
then reproduce and pass on this "new"
gene, altering their gene pool Natural
The natural genetic variation within a population of organisms selection, therefore, decreases the
May cause some individuals to survive and reproduce more frequencies of alleles that reduce the
Successfully than others in their current environment. fitness of an organism and increases the
frequency of alleles that improve fitness.

In the process of natural selection, one genotype (the


hereditary constitution of an individual) leaves more
offspring than another genotype because of superior life
attributes, known as fitness.

Note that 'genetic programming' is different from 'genetic


algorithms': in the first one there is a mathematical
function which evolve whereas this is a population of
data in the second one.

MSC Computing and Design


UEL
Mutation / Crossover
Each individual program in the population is either measured or compared in terms of how well it performs
the task at hand (using the fitness) measure provided in the third preparatory step)

Genetic operations include crossover (sexual This measurement yields a single explicit numerical
recombination), mutation, reproduction, gene value, called fitness.
duplication, and gene deletion.
MSC Computing and Design
UEL
Entry Paradise Pavillion
The phenomenology and structure of micro-organisms like coral polyps or radiolarians are the basis of
the computer simulation of naturally evolving systems. In the field of ‘genetic architecture’, algorithmic
codes are created. These codes trigger chains of commands that are similar to organic growth. In this
way, the process of design is replaced by the process of discovery and selection.”

Microscopic cell structures served as the inspiration for the design of a pavilion that is reminiscent of
irregular natural forms like foam, sponge, or coral reefs.

MSC Computing and Design Sydney based architect Chris Bosse


UEL
Derived from Nature / Design by Optimization:
The shape of the pavilion is not explicitly "designed",
it is rather the result of the most efficient subdivision
of three-dimensional space, found in nature, such as
organic cells, mineral crystals and the natural
formation of soap bubbles . This concept was
achieved with a flexible material that follows the
forces of gravity, tension and growth, similar to a
spider web or a coral reef.

Structure and Space


The project renounces on the application of a
structure in the traditional sense. Instead, the
space is filled with a 3-dimensional lightweight-
sculpture, solely based on minimal surface
tension, freely stretching between wall and ceiling
and floor.

Innovation and Digital Workflow:


The product shows a new way of digital workflow,
enabling the generation of space out of a
lightweight material in an extremely short time. The
computer-model, based on the simulation of
complexity in naturally evolving systems, feeds
directly into a production-line of sail-making-software
and digital manufacturing.

MSC Computing and Design


UEL
Chris Bosse

Genetic furniture

Based on the phenomenology and structure of


micro-organisms such as radiolarians, as a base for
computational simulation of naturally evolving
systems. Shifting the traditional understanding of
aesthetics to new boundaries through curated
discovery rather than "design. The production
techniques reflect the latest technologies from rapid
prototyping to mass customisation.

MSC Computing and Design


UEL
So Remember.....

We can now employ computers in every stage of the design


process... they are not our enemies...but our friends..here to
support and help us.

So remember, evolutionary design systems are intended to


be used by you...not replace you!

MSC Computing and Design


UEL
References

Books
John Frazer(1995) An evolutionary Architecture
Peter j. Bentley (1999) Evolutionary design by computers
Brian K. Hall, Jones(1941) Evolution: Principles and Processes
Paul Coates (2010) Programming. Architecture

Websites
http://schoolworkhelper.net/wp-content/uploads/2010/11/meiosis.jpg
http://www.cs.sandia.gov/opt/survey/ea.html
http://www.genetic-programming.org/
http://www.cs.northwestern.edu/~fjs750/netlogo/final/gpdemo.html
http://www.cs.ucl.ac.uk/research/genprog/gp2faq/gp2faq.html
http://www.bloomshare.com/genetic-programming/
http://www.gene-expression-
programming.com/GepBook/Chapter1/Section5.htm
http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-
mona-lisahttp://www.cs.sandia.gov/opt/survey/ea.html

MSC Computing and Design


UEL

You might also like