Biologically inspired algorithms BY: Andy Garrett YE Ziyu.
-
Upload
juliet-owens -
Category
Documents
-
view
222 -
download
0
Transcript of Biologically inspired algorithms BY: Andy Garrett YE Ziyu.
![Page 1: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/1.jpg)
Evolutionary Computation
Biologically inspired algorithms
BY:Andy GarrettYE Ziyu
![Page 2: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/2.jpg)
What is Evolutionary Computation
• A subfield of artificial intelligence which mimics biology• Used in optimization of black box problems• Parallel processing
![Page 3: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/3.jpg)
Types of Evolutionary Computation
• Evolutionary programing• Genetic algorithms• Evolutionary strategies• Genetic programing
• Genetic algorithms• Swarm intelligence
![Page 4: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/4.jpg)
Genetic Algorithms
![Page 5: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/5.jpg)
Genetic Algorithm——what is gene?
Biology:A certain DNA sequenceat a certain position of the chromosome.
Genetic Algorithm :A certain value of a certain element of the solution.
2 3 1 1 1
2 3 2 1 1
2 3 3 1 1
A certain element (an allele) of the solution (the chromosome)
Three alternative values (genes)
![Page 6: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/6.jpg)
Genetic Algorithm——what is gene?
Biology Genetic Algorithm
Genes
Chromosome
Fitness of a individualIn the environment
Genes
Solution
Performance of a solutionin the problem. (Fitness)
constitute constitute
determines determines
![Page 7: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/7.jpg)
Genetic Algorithm——what is gene?
In Genetic Algorithm, genes (values of elements of the solution) determine the fitness (performance) of a solution.
To solve a problem=
To find the combination of genes that provides the best fitness (performance)
![Page 8: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/8.jpg)
Genetic Algorithm——Initiation
To conduct evolution,We need a set of solutions.(A population)
Initially, the population is generated randomly. This isthe first generation. A two-dimension search space
dotted by randomly generated solutions(each solution consists of two elements,
x and y)
X
Y
![Page 9: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/9.jpg)
Genetic Algorithm——Reproduction: Crossover
Crossover is how we create new individuals from the existing ones.
2
3
1
4
4
1
2
2
1
3
Two solutions somehow be
selected as “parents”
2
3
1
4
4
1
2
2
1
3
Randomly selectone (or more)
point
2
3
2
1
3
1
2
1
4
4
Apply cross(Recombine the two solutions)
2
3
2
1
3
1
2
1
4
4
Finish!These will be two
Individuals inthe next generation
![Page 10: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/10.jpg)
Genetic Algorithm——Reproduction: Selection
• Individuals with higher fitness have a higher probability to be chosen as parents of the crossover operation.
• Survival of the fittest
![Page 11: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/11.jpg)
Genetic Algorithm——Reproduction: Selection
What’s the effect?
Genes associated with high fitness are more likely to be passed to the new generation.
After some generations, the average fitness of the population gets improved!
![Page 12: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/12.jpg)
Genetic Algorithm——Reproduction: Selection
In a graphic view: (use our two-dimension example)
The population gathers aroundthe optimal solution.
It’s like that the population is climbing the hill.
Problem solved?
X
Y
![Page 13: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/13.jpg)
Genetic Algorithm——Mutation
Problem: What if we have multiple hills in the searching
space?
The individuals may climb onto a hill that is not the highest.
Thus, they may gather around a local optimum.
Y
X
Y
(Local optimum)
(Global optimum)
![Page 14: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/14.jpg)
Genetic Algorithm——Mutation
According to the crossover operation, genes in the new generation only come from the previous generation.
Thus, once the solutions gather around a local optimum, they will be constrained in its vicinity!
They won’t find the global optimum.
X
Y
(Constraining region)
![Page 15: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/15.jpg)
Genetic Algorithm——Mutation
Mutation: Make random changes to some genes in each generation.
NEW genes are created!Solutions can jump out of the region.After some generations, they may probably gather around theglobal optimum.
X
Y
![Page 16: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/16.jpg)
Genetic Algorithm——Scenario
Step 1: Initiation (Randomly generate the first generation);Step 2: Mutation;Step 3: Fitness evaluation; Step 4: Reproduction:
Selection;Crossover;
Step 5: Go back to step 2, repeat this loop until a sufficiently good solution is found.
![Page 17: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/17.jpg)
Swarm intelligence
![Page 18: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/18.jpg)
Swarm Intelligence
Swarm intelligence=
cognition of individuals + communication
Application in optimization problems:Particle Swarm Optimization (PSO)
![Page 19: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/19.jpg)
Swarm Intelligence——Initiation
Randomly generate a set of solutions (called a swarm of particles),their initial positions,and their initial speeds.
X
Y
V2oV3o
V1o
![Page 20: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/20.jpg)
Swarm Intelligence——Travelling
Two forces are exertedon each particle:
X
Y
1. Force pointing to the bestsolution this particle has everpassed through (pbest)2. Force pointing to the bestsolution any particle has everpassed through (gbest) pbest gbest
pbest1
pbest2(gbest)
pbest3
![Page 21: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/21.jpg)
Swarm Intelligence——Travelling
Forces pointing to pbests:Fp1, Fp2, Fp3
These forces result from the cognition of individual particles.
X
Y
Fp3
Fp2
Fp1
![Page 22: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/22.jpg)
Swarm Intelligence——Travelling
Forces pointing to gbests:Fg1, Fg2, Fg3
These forces result from the communication among the particles.
X
Y
Fg3 Fg2Fg1
![Page 23: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/23.jpg)
Swarm Intelligence——Travelling
After some time, the particles would probablyfind some solutions thatare sufficiently close theglobal optimum.
X
Y
Fg3 Fg2Fg1Fp3
Fp2
Fp1
https://www.youtube.com/watch?v=j028fsZZZI4
![Page 24: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/24.jpg)
Evolutionary Computation
• Time complexity is not generally considered• Number of iterations required for convergence
![Page 25: Biologically inspired algorithms BY: Andy Garrett YE Ziyu.](https://reader035.fdocument.pub/reader035/viewer/2022062301/5697bf951a28abf838c9086b/html5/thumbnails/25.jpg)
Questions?