Top Banner
Evolutionary Design By: Dianna Fox and Dan Morris
51

Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Jul 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Evolutionary Design

By: Dianna Fox

and

Dan Morris

Page 2: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 3: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Review4 main types of Evolutionary

Algorithms

• Genetic Algorithm - John Holland

• Genetic Programming - John Koza

• Evolutionary Programming - LawerenceFogel

• Evolutionary Strategies - Ingo Rechenberg

Page 4: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Genetic Algorithms

• Most widely used

• Robust

• uses 2 separate spaces– search space - coded solution (genotype)

– solution space - actual solutions (phenotypes)

• Genotypes must be mapped to phenotypesbefore the quality or fitness of each solutioncan be evaluated

Page 5: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Genetic Programming

• Specialized form of GA

• Manipulates a very specific type ofsolution using modified genetic operators

• Original application was to designcomputer program

• Now applied in alternative areas eg.Analog Circuits

• Does not make distinction betweensearch and solution space.

• Solution represented in very specifichierarchical manner.

Page 6: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Evolutionary Strategies

• Like GP no distinction between search andsolution space

• Individuals are represented as real-valuedvectors.

• Simple ES– one parent and one child

– Child solution generated by randomly mutating theproblem parameters of the parent.

• Susceptible to stagnation at local optima

Page 7: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Evolutionary Strategies (cont’d)

• Slow to converge to optimal solution

• More advanced ES– have pools of parents and children

• Unlike GA and GP, ES– Separates parent individuals from child

individuals

– Selects its parent solutions deterministically

Page 8: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Evolutionary Programming

• Resembles ES, developed independently

• Early versions of EP applied to the evolution of transitiontable of finite state machines

• One population of solutions, reproduction is by mutationonly

• Like ES operates on the decision variable of the problemdirectly (ie Genotype = Phenotype)

• Tournament selection of parents– better fitness more likely a parent

– children generated until population doubled in size

– everyone evaluated and the half of population with lowest fitnessdeleted.

Page 9: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

General Idea of Evolutionary Algorithms

Page 10: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Evolutionary Art

Computer Evolution of BuildableObjects

Page 11: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Evolutionary Art

Stephen Todd and William Latham

built artistic system called “Mutator”

• Computer program based on mutation andnatural selection to help an artist explore theworld of three dimensional art forms.

• Produces horns, pumpkins, shells,mathematical shapes and many other shapes

Page 12: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 13: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 14: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 15: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 16: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 17: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 18: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 19: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 20: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 21: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 22: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 23: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 24: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 25: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 26: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 27: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Computer Evolution ofBuildable Objects

• Project of Pablo Funes and Jordan Pollack

Taken from http://www.cs.brandeis.edu/~pollack/Taken from http://www.cs.brandeis.edu/~pablo/indexe.html

Page 28: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Project Details

• Used computers to generate 2-D and 3-Dobjects in simulation that would performcorrectly in the real world.

• Used miniature plasticbricks (commonlyknown as Lego) tobuild and test thedesigns

Page 29: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Why use Lego?

• Can easily build cheap and handy structures

• Have a property which simplifies theexperiment and eases design consideration

• What property? “The resistance of Legoblocks far surpasses the force necessary toeither join two of them together or breaktheir unions.”

Page 30: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Simplification of Model

• To simplify the model, only the ‘fulcrum’effect acting on a pair of Lego blocks wasconsidered.

• It was assumed that radial forces (such asvertical pulls) would not occur.

Page 31: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Minimal Torque Capacities

Joint Size(knobs)

Approximate Torque Capacity(N-m * 10-6)

1234567

10.450.289.6

157.3281.6339.2364.5

Page 32: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space
Page 33: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Operating Heuristic

“As long as there is a way to distribute theweights among the network of bricks suchthat no joint is stressed beyond itsmaximum capacity the structure will notbreak.”

• No complete algorithm has been found

Page 34: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Greedy Algorithm

• Does not guarantee that all solutions will befound

• Each joint j can support a certain fraction aof a force on the network. This fraction isgiven by:

Where Kj is the maximum capacity of the joint, d(j,F) is thedistance between the line generated by the force vector andthe joint, and f is the magnitude of the force.

Page 35: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Greedy Algorithm (cont.)

• Once a solution for the distribution of thefirst mass has been found, it is fixed and theremaining capacity for each joint iscomputed.

• This will give a reduced network that mustsupport the next force.

Page 36: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Evolutionary Algorithm?

• A steady-state, genetic algorithm was usedto solve the problem

• Initialized with a population of a singlebrick

• Through mutation and crossover, apopulation of 1000 individuals wasgenerated

Page 37: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Encoding for 2-D structure

• This join was encoded as:

(10 nil (2 (6 nil nil nil)) nil nil)

Page 38: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Encoding Explained

• Uses pseudo-Lisp notation

• Individual brick:• (10 nil nil nil nil)

• Joined by two knobs:• (10 nil (2 ()) nil nil)

• With a 6 knob brick:• (10 nil (2 (6 nil nil nil)) nil nil)

Page 39: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Mutation and Crossover

• Mutation operates by either randommodification of a brick’s parameters (size,position, orientation) or addition of arandom brick.

• Crossover involves two parent trees out ofwhich random subtrees are selected. Theoffspring generated has the first subtreeremoved and replaced by the second.

Page 40: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Fitness Function

• Doesn’t presuppose any knowledge aboutgood design or common engineeringpractices that would bias the results

• Provides measures of feasibility andfunctionality

Page 41: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Algorithm

While maximum fitness < Target fitness

Do Randomly select mutation or crossover

Select 1 (for mutation) or 2 (for crossover) random individual(s)

with fitness proportional probability

Apply mutation or crossover operator

Generate physical model and test for gravitational load.

If the new model will support its own weight

Then replace a random individual with it

(chosen with inverse fitness proportional probability)

Page 42: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Practical Examples

• Reaching a target point:• Bridges and Scaffolds

• External Loads:• Horizontal Crane Arm

• Constraining the space:• Diagonal Crane Arm

Page 43: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Reaching a Target Point

• Fitness Function:• Normalized distance to the target:

Where S is the structure, T is the targetpoint and d is the Euclidean distance

Page 44: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Bridge

• An example successful run

• The target fitness was reached after133,000 generations

Page 45: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Example Run

Page 46: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Scaffold

• Evolved in 40,000generations

Page 47: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

External Loads

• Uses a two-step fitness function

• Weight is added in small increments to seehow much the structure can hold

Page 48: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Constraining the Space

• Bricks could only be placedabove the diagonal

• Fitness Function:

fraction of weight supported *

length of the arm along the x axis

Page 49: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Optimization

• Usually don’t reward or punish for thenumber of bricks used

• Leads to unused bricks

• Can add a little reward for lightness

Page 50: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Fitness: 24.002913

Fitness: 24.004095

Page 51: Evolutionary Designpages.cpsc.ucalgary.ca/~jacob/Courses/Winter2000/CPSC533/Slides… · Genetic Algorithms • Most widely used • Robust • uses 2 separate spaces –search space

Limitations

• Noise

• Safety concerns

• No complete algorithm has been found

results in a conservative model