Lecture 5 - Evolutionary algorithms
Lecture 5 - Evolutionary algorithms
Systems
Lecture 5
Evolutionary algorithms
Lecture 3
Evolutionary algorithms
1: Introduction to evolution
Evolutionary Algorithms:
Introduction
Motivation:
•Many real-world problems are complex, non-linear, and multi-
dimensional, making traditional optimization methods ineffective.
•Inspired by natural selection, evolutionary algorithms provide a
robust solution to explore large search spaces efficiently.
Key Concepts:
•Population-based search: Simulates a group of potential solutions
evolving.
•Natural selection mechanisms: Processes like selection, crossover,
and mutation drive the evolution of solutions.
Why Important:
•Scalability: Can handle complex, high-dimensional problems.
•Flexibility: Applicable across various domains like AI, engineering,
and economics.
•Global optimization: Less prone to getting stuck in local optima
than traditional methods.
Why Draw Inspiration from Evolution?
Video from https://www.youtube.com/ watch?v=g0TaYhjpOfo
Video from https://www.youtube.com/ watch?v=T- c17RKh3uE
Evolution
• Biological evolution:
• Lifeforms adapt to a particular environment over successive
generations.
• Combinations of traits that are better adapted tend to increase
representation in population.
• Mechanisms: Variation (Crossover, Mutation) and Selection (Survival of
the fittest).
• Evolutionary Computing (EC):
• Mimic the biological evolution to optimize solutions to a wide variety of
complex problems.
• In every new generation, a new set of solutions is created using bits
and pieces of the fittest of the old.
Lecture 3
Evolutionary algorithms
2: Evolutionary algorithms
Y
Evolutionary algorithms
single solution.
•Genetic Operators:
Selection: Favors better solutions to
pass their "genes" to the next generation.
Crossover (Recombination): Combines
parts of two or more solutions to create
new offspring.
Mutation: Introduces random changes to
individuals to maintain genetic diversity.
•Aerospace Design (NASA):
Used to optimize spacecraft components, such as antenna
designs, improving communication efficiency while minimizing
weight.
Evolutionary •Robotics:
EAs evolve optimal walking gaits and control systems for robots,
enhancing adaptability to different environments and improving
algorithms – precision.
•Traffic and Transportation Optimization:
Area of Applied to synchronize traffic lights and optimize vehicle routing,
reducing congestion and improving fuel efficiency in urban
Application
transport systems.
Manufacturing and Scheduling:
In industries like automotive and electronics manufacturing, EAs are
used for optimizing production schedules and workflows. They help in
minimizing production time, reducing waste, and optimizing the use of
machinery and labor.
•Finance (Trading and Portfolio Management):
•Used for evolving trading strategies that adapt to market
conditions, optimizing investment returns, and managing financial
risks.
General scheme of EAs
EA scheme in pseudo-code
Scheme of an EA:
Two pillars of evolution
There are two competing forces
&
-
Increasing population diversity Decreasing population diversity by
by genetic operators selection
of parents
mutation
of survivors
recombination
Intialization
Recombination
(crossover)
Population
Mutation
Termination
Offspring
Survivor selection
Main EA components:
Population
Intialization
Recombination
(crossover)
Population
Mutation
Termination
Offspring
Survivor selection
Main EA components:
Selection mechanisms
• Identify individuals
• to become parents
• to survive
• Pushes population toward higher fitness
• Parent selection is usually probabilistic
• high-quality solutions are more likely to be selected than low-
quality, but not guaranteed
• This stochastic nature can aid escape from local optima
General scheme of EAs
Parent selection Parents
Intialization
Recombination
(crossover)
Population
Mutation
Termination
Offspring
Survivor selection
Main EA components:
Variation operators
• Role: to generate new candidate solutions
• Usually divided into two types according to their arity
(number of inputs to the variation operator):
• Arity 1 : mutation operators
• Arity >1 : recombination operators
• Arity = 2 typically called crossover
• Arity > 2 is formally possible, seldom used in EC
Main EA components:
Mutation
• Role: cause small, random before 1 1 1 1 1 1 1
variance to a genotype
• Element of randomness
is essential and
differentiates it from other
unary heuristic operators after
1 1 1 0 1 1 1
Main EA components:
Recombination (1/2)
• Role: merges information from parents into offspring
• Choice of what information to merge is stochastic
• Hope is that some offspring are better by combining elements of
genotypes that lead to good traits
Main EA components:
Recombination (2/2)
Parents
cut cut
1 1 1 1 1 1 1 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0 0 1 1 1 1
Offspring
Crossover and/or mutation?
Intialization
Recombination
(crossover)
Population
Mutation
Termination
Offspring
Survivor selection
Main EA components:
Initialisation / Termination
• Initialisation usually done at random
• Need to ensure even spread and mixture of possible allele values
• Can include existing solutions, or use problem-specific heuristics,
to “seed” the population
• Termination condition checked every generation
• Reaching some (known/hoped for) fitness
• Reaching some maximum allowed number of generations
• Reaching some minimum level of diversity
• Reaching some specified number of generations without fitness
improvement
Typical EA behavior: Stages
Stages in optimising on a 1- dimensional fitness landscape
Early stage:
quasi-random population distribution
Mid-stage:
population arranged around/on hills
Late stage:
population concentrated on high hills
Lecture 3
Evolutionary algorithms
• Uniform Mutation:
5: Permutation
Permutation Representations
Making breakfast: