Top Banner
Emergent Design Martin Hemberg Imperial College London Architectural Association
61

Emergent Design Martin Hemberg Imperial College London Architectural Association.

Jan 12, 2016

Download

Documents

Aleesha Eaton
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: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Emergent Design

Martin Hemberg

Imperial College London

Architectural Association

Page 2: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Yours Truly

• Developed Genr8 with the Emergent Design Group (EDG) at MIT in 2001

• Teach at the Emergent Design + Technologies (EmTech) MA/MArch program at AA since 2003– PhD student at Dept of Bioengineering at

Imperial College

Page 3: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Agenda

• Motivation• Emergence• Evolutionary

Computation (EC)• Artificial Life (ALife)

– Lindenmayer Systems (L-systems)

• Genr8

Page 4: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Motivation, Architecture

• New paradigm, based on different concepts than traditional design logics– New algorithms and ways of thinking required

• Inspiration from biology– Biomimetics

• Natural form has aesthetic and functional values

Page 5: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Motivation, Computer Science

• Application of EC– Exploration, not

optimization– Fitness evaluation

• Use computers creatively– Beyond CAD tools– Require new

algorithms and software

Page 6: Emergent Design Martin Hemberg Imperial College London Architectural Association.

What is Emergence?

• The whole is greater than the sum of the parts

• Bottom-up instead of top-down

• Local interactions produce global behaviour

• Examples include brain, economics, flocks, etc

Page 7: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Flocking

• Boids algorithm• Craig Reynolds, 1986• Used in Lion King,

Lord of the Rings, etc• Swarm bots• Real animals

Page 8: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Flocking, rules

Alignment Cohesion

Separation

Page 9: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Why is emergence useful?

• Focus on bottom-up interactions– Traditionally top-down control– Complex behaviour comes from interaction of

simple parts– New possibilities for designers and architects

Page 10: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Artificial life

• Understand the principles of Biology

• How does life arise from the non-living?

• What are the potentials and limits of living systems?

• How is life related to mind, machines, and culture?

Page 11: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Evolutionary Computation

• Randomized optimization algorithm

• Inspired by natural evolution

• Comes in many different flavours, – Genetic Algorithms (GA), bit-arrays (Holland)– Genetic Programming (GP), executable tree

structures (Koza)– Evolutionary Strategies (ES), floating point

numbers (Rechenberg and Schwefel)

Page 12: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Optimization

• Find the best possible solution• Mathematically:Given: a function f : A->R from some set A to the real numbersSought: an element x0 in A such that f(x0) ≤ f(x) for all x in A.

Page 13: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Evolutionary Computation, features

• Population of candidate solutions– Parallel search for solutions

• Population of solutions for a specific problem adapts generation by generation

• No guarantees for finding global optimum

Page 14: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Genotype and phenotype

• Genotype – the genetic makeup of an organism

• Phenotype – the visible or measurable characteristics of an organism

Page 15: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Neo Darwinian Evolution

• Survival of the fittest• Selection on

phenotype– Through environment

• Genotypic inheritance• Reproduction• Blind variation

Page 16: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Artificial evolution

Pseudocode for an EA:generation = 0;

initialize population;while generation < max-generation

evaluate fitness of population membersfor i from 1 to population-size

select two parents;crossover parents -> child;mutate child;insert child into next generation’s

population;endfor;generation++;update current population

endwhile;

Iterateby generation

Fitness biased selectionInheritanceVariation

Page 17: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Fitness

• A leap from natural evolution

• Try each member on the problem and rank them or quantify their performance

• A numerical value is assigned to each member

Page 18: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Selection

• Fitter individuals higher probability of selection for reproduction

• Based on phenotype, an expression of genotype

Page 19: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Reproduction

• Sexual vs asexual

• Recombine the existing solution candidates

• Heuristically, we know that solution will improve on average

Page 20: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Crossover and mutation

• Crossover operator mixes the genetic material from parents for offspring– Recombine useful

genes

• Mutation is blind variation, introduces new genes into the population

Page 21: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Simple example

• Genome is fixed length binary string

• Fitness is equal to number of ones

– Select 1 and 2– Crossover at 2

110011000111

• New individuals110111000011

Fitness Select

4 1/3

3 ¼

3 ¼

2 1/6

Genome

110011

000111

011010

000101

Page 22: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Fitness function

• Previous steps problem independent

• Choice of fitness function makes EA problem specific– Defining and evaluating fitness function often

complicated and time consuming

• Often evaluates the genome directly

Page 23: Emergent Design Martin Hemberg Imperial College London Architectural Association.

When are EAs useful?

• Good finding near-optimal solutions for complicated and non-linear problems

• Useful when we lack accurate representation for solving problem

• Requires:– Representation of candidate solutions– Fitness function

Page 24: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Fitness Evaluation

• How to assign fitness according to aesthetic criteria?– How can we assign numerical values?– Need to figure out what to optimize

• Open problem

Page 25: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Fitness Evaluation, strategies

• Rule based– Hard to define and encode rules

• Learn user preference with neural network– Too many parameters, fails in practice

• User acts as fitness function– Human fatigue, short runs

Page 26: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Fitness Evaluation, my view

• Creative design tools with the designer central– Tools should be open-ended– Can’t predict and cater for user’s needs and

context

• Parameterized fitness function– User has high level control of evaluation

Page 27: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Fitness function, features

• Multiparametric optimization– Fitness emerges as a

combination of factors– Trade-off between

criteria

• Population gives family of solutions

Page 28: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Genr8 – A design tool for surface generation

• Combines EC and an organic growth model

• Surfaces are grown in a reactive simulated physical environment

Page 29: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Lindenmayer Systems

• Organic growth model

• Widely applied to model plant growth in computer graphics

• L-systems are important in formal language theory

• Prusinkiewicz and Lindenmayer “The algorithmic beauty of plants”

Page 30: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Rewrite systems

• A set of production rules are repeatedly applied to a seed

• Rules are expressed as a grammar:Seed: aRule: a->ab

b->ba

a -> ab -> abba -> abbabaab -> ....

Page 31: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Turtle graphics

• Turtle graphics is a way to visualize the grammar

• Rules are interpreted as instructions for moving and drawing in 3D space

Page 32: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Example, Koch curve

• Koch curve or snowflake, a fractal curve (infinite length but finite area)Seed: aRule: a->a+a--a+aAngle: 60

– Letter - move forward and draw line

– +/- - turn left/right

Page 33: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Branching

• Introduce two new operators to allow branching– “[“ – push state on stack– “]” – pop state from stack

Page 34: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Branching, example

Seed: aRule: a->a[+a]aAngle: 45

Turtle position

Page 35: Emergent Design Martin Hemberg Imperial College London Architectural Association.

L-systems advanced features

• Additional features include– Time delay (flowers

and leaves forming)– Random growth (not

all plants identical)– Environment (tropism)

Page 36: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Map L-systems

a -> d[~a]b a b

d

a

b -> b b b

c -> b[-~a]b b a

bc

d -> c d c

seed

d

c

b

a

c b

b

b b

a

a

d

b b

b

b d

c a

b

b

b

b

b

b

ba

c

d

b

b

b

b

b

b

b

a

b b

bd

c

b

b

b

b

b

b

b

B b

bc

Page 37: Emergent Design Martin Hemberg Imperial College London Architectural Association.

HEMLS

• 3D• Scaling

Page 38: Emergent Design Martin Hemberg Imperial College London Architectural Association.

HEMLS, Environment

• Growth in a simulated reactive physical environment– Forces

• Attractors• Repellors• Gravity

– Boundaries

Page 39: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Growth example

Page 40: Emergent Design Martin Hemberg Imperial College London Architectural Association.

HEMLS

• More complex productions– Context sensitivity– Time variation– Stochastic

Page 41: Emergent Design Martin Hemberg Imperial College London Architectural Association.

HEMLS grammars

• Genr8 includes parser for HEMLS grammars

• User-specified systems– Very hard to construct by hand to obtain

specific outcome– Environmental influence very hard to predict

Page 42: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Pre-defined grammars

• Square and triangular patterns pre-defined– Versatile– Squares can yield

NURBS-surfaces

Page 43: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Evolution

• Search the universe of possible surfaces– Find a grammar

corresponding to the surface the designer has in mind

– Find something the designer was not thinking of

Page 44: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Grammatical Evolution

• Automatic generation of grammars

• Many constraints -> problematic for GP• Grammatical Evolution allows any language

– Use Backus-Naur Form (BNF) to map linear genome into a grammar

– Genetic operations are separated from language

• www.grammatical-evolution.org (Ryan and O’Neill)

Page 45: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Grammars

• Form sentences, arrays of symbols or words from an alphabet

• A grammar defines the syntax of a language– Formalism can be applied to English, French,

java, algebra, etc• I stand here – correct syntax• Here stand I – incorrect syntax

Page 46: Emergent Design Martin Hemberg Imperial College London Architectural Association.

BNF

• Formal meta syntax for expressing context free grammars– N - a finite set of non-terminal symbols,– T - a finite set of terminal symbols,– S - a special start symbol,– P - a finite set of production rules

Page 47: Emergent Design Martin Hemberg Imperial College London Architectural Association.

BNF, Example

• N = { <number>, <digit> }T = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }S = { <number> }P = {<number> ::= <digit> | <number> <digit>

<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }

<number>

<digit> <number>

<digit> <number>

<digit> <number>

Example: 542 =>

5

4

2

Page 48: Emergent Design Martin Hemberg Imperial College London Architectural Association.

HEMLS, BNF

• Terminals are turtle commands

• Genr8 evolves instructions for how to grow a surface

• These instructions are interpreted in a simulated environment

Page 49: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Mapping

• Several mappings– Increases the

complexity

• Individuals represented by linear genome

• Selection on the phenotype that is expressed through an environment

Page 50: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Design evaluation and fitness

• Fitness function with multiple parameters– Size

– Smoothness

– Soft boundary

– Subdivisions

– Symmetry

– Undulation

• User determines target values and weights for the criteria

Page 51: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Fitness evaluation, example

Criteria Target Weight

Smooth 5 1

Subdivisions

0 3

Undulation 3 2

Surface Diff W Diff

7.23 2.23 2.23

0.45 0.45 1.35

6.2 3.2 6.4

Fitness value = 2.23 + 1.35 + 6.4 = 9.98

Page 52: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Interruption, Intervention and Resumption (IIR)

• Allow user more control of the tool

• User can guide the evolution by interacting and interfering

Page 53: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Practicalities

• Plug-in for Maya

• Advantages for user– Easy to integrate into a design process– Easier to learn

• Advantages for developer– Lots of functionality for free

Page 54: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Scripting

• GUI• MEL command

– Scripts for sweeping parameter space

– Automatic saving, exporting etc

Page 55: Emergent Design Martin Hemberg Imperial College London Architectural Association.

When and why to use Genr8

• Digital sketching tool• Can provide

suggestions to the user– Prepare to give up

control– Create using different

logic– Explore novel

algorithms for form-finding

Page 56: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Using Genr8

1. Set up environment2. Decide pre-defined, user-defined or

evolved grammar– Set fitness function parameters

3. User evaluates output4. If not happy

Go back to 1else

End

Page 57: Emergent Design Martin Hemberg Imperial College London Architectural Association.

To keep in mind

• Understand difference between growth and evolution

• Understand difference in impact between parameters, environment and fitness criteria

• Not all parameters are equally important

• Pre-defined grammars + environment very powerful

Page 58: Emergent Design Martin Hemberg Imperial College London Architectural Association.

To keep in mind

• Avoid getting overwhelmed by the volume of output– Impose external evaluation criteria which is

mapped into Genr8, possibly via external analysis

– Don’t let it run and hope it will produce interesting results

– Must actively prod the tool in the desired direction

Page 59: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Genr8 issues

• No notion of materials or structure– User must rely on

geometry

• A few annoying bugs• Not sure how much

students really understand?

Page 60: Emergent Design Martin Hemberg Imperial College London Architectural Association.

More about emergent design

• Genr8 website• http://projects.csail.mit.edu/emergentDesign/genr8

• EDG website• http://web.mit.edu/arch/edg

• EmTech website• http://www.aaschool.ac.uk/et

• Special issue of Architectural Design (AD)

Page 61: Emergent Design Martin Hemberg Imperial College London Architectural Association.

Acknowledgements

• MIT– Una-May O’Reilly– Peter Testa– Simon Greenwold– Devyn Weiser

• AA– Achim Menges– Mike Weinstock– Michael Hensel– Many AA students