lecture 6 - department of informatics · 2015. 12. 14. · [email protected] biologically inspired...

27
[email protected] http://informatics.indiana.edu/rocha/i-bic biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired computing lecture 6

Upload: others

Post on 19-Jan-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

[email protected]://informatics.indiana.edu/rocha/i-bic

biologicallyInspired

computing

INDIANAUNIVERSITY

Informatics luis rocha 2015

biologically-inspired computinglecture 6

Page 2: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

course outlook

Assignments: 35% Students will complete 4/5 assignments

based on algorithms presented in class Lab meets in I1 (West) 109 on Lab

Wednesdays Lab 0 : January 14th (completed)

Introduction to Python (No Assignment) Lab 1 : January 28th

Measuring Information (Assignment 1) Due February 11th

Lab 2 : February 11th

L-Systems (Assignment 2)

Sections I485/H400

Page 3: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

Readings until now Class Book

Nunes de Castro, Leandro [2006]. Fundamentals of Natural Computing: Basic Concepts, Algorithms, and Applications. Chapman & Hall. Chapter 8 - Artificial Life Chapter 7, sections 7.1, 7.2 and 7.4 – Fractals and L-Systems Appendix B.3.1 – Production Grammars

Lecture notes Chapter 1: “What is Life?” Chapter 2: “The logical Mechanisms of Life” Chapter 3: Formalizing and Modeling the World

posted online @ http://informatics.indiana.edu/rocha/i-bic Papers and other materials

Life and Information Kanehisa, M. [2000]. Post-genome Informatics. Oxford University Press.

Chapter 1. Logical mechanisms of life (H400, Optional for I485)

Langton, C. [1989]. “Artificial Life” In Artificial Life. C. Langton (Ed.). Addison-Wesley. pp. 1-47.

Optional Flake’s [1998], The Computational Beauty of Life. MIT Press.

Chapter 1 – Introduction Chapters 5, 6 (7-9) – Self-similarity, fractals, L-Systems

Page 4: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

Modeling the World

World1

Measure

Symbols(Images)

Initial Conditions

Measure

Logical Consequence of Model

ModelFormal Rules

(syntax)

World2Physical Laws

Observed Result

Predicted Result????

Enco

ding

(Sem

antic

s)

(Pragmatics)

“The most direct and in a sense the most important problem which our conscious knowledge of nature should enable us to solve is the anticipation of future events, so that we may arrange our present affairs in accordance with such anticipation”. (Hertz, 1894)

Hertzian modeling paradigm

Page 5: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

Natural design principles

self-similar structures Trees, plants, clouds, mountains

morphogenesis Mechanism

Iteration, recursion, feedback Dynamical Systems and Unpredictability

From limited knowledge or inherent in nature? Mechanism

Chaos, measurement Collective behavior, emergence, and self-organization

Complex behavior from collectives of many simple units or agents cellular automata, ant colonies, development, morphogenesis, brains,

immune systems, economic markets Mechanism

Parallelism, multiplicity, multi-solutions, redundancy Adaptation

Evolution, learning, social evolution Mechanism

Reproduction, transmission, variation, selection, Turing’s tape Network causality (complexity)

Behavior derived from many inseparable sources Environment, embodiment, epigenetics, culture

Mechanism Modularity, connectivity, stigmergy

exploring similarities across nature

Page 6: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

Coastlines

Measured maps with different scales Coasts of Australia, South Africa, and Britain Land frontiers of Germany and Portugal Measured lengths L(d) at different scales d.

As the scale is reduced, the length increases rapidly.

Well-fit by a straight line with slopes (s) on log/log plots s = -0.25 for the west coast of Britain, one of

the roughest in the atlas, s = -0.15 for the land frontier of Germany, s = -0.14 for the land frontier of Portugal, s = -0.02 for the South African coast, one of

the smoothest in the atlas. circles and other smooth curves have line of

slope 0.

Lewis Richardson's observations (1961)

Page 7: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

Page 8: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

[email protected]://informatics.indiana.edu/rocha/i-bic

biologicallyInspired

computing

INDIANAUNIVERSITY

Informatics luis rocha 2015

Integer dimensionsregular volumes

Scientific American, July 2008

Page 9: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

dimension of fractal curves

Koch curve slightly more than line but less

than a plane Packing efficiency!

N=4n

the Koch curve example: fractional dimensions

a=1/3n

Measuring scale

...26186.13log4log

1log

log==

=

a

ND

=⇒

=

a

NDa

ND

1log

log1

Unit measure

Number of unitsHausdorff Dimension

n =0

n =1

n =2

n →∞

a=1 unit (meter)

Page 10: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

re-writing design principle

Complex objects are defined by systematically and recursively replacing parts of a simple start object with another object according to a simple rule Cantor Set

n =0

n =1n =2

n →∞

mathematical monsters

Scientific American, July 2008

6309.01log

log=

=

a

ND

Hausdorff Dimension

Page 11: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

re-writing design principle

Complex objects are defined by systematically and recursively replacing parts of a simple start object with another object according to a simple rule Sierpinski Gasket

mathematical monsters

585.11log

log=

=

a

ND

Hausdorff Dimension

Scientific American, July 2008

Page 12: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

re-writing design principle

Complex objects are defined by systematically and recursively replacing parts of a simple start object with another object according to a simple rule Menger sponge

mathematical monsters

7268.21log

log=

=

a

ND

Hausdorff Dimension

Scientific American, July 2008

Page 13: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

[email protected]://informatics.indiana.edu/rocha/i-bic

biologicallyInspired

computing

INDIANAUNIVERSITY

Informatics luis rocha 2015

Box-counting dimensiondimension of fractal curves

=→

ε

εε 1log

)(loglim0

ND

Length of box side

Number of boxes

Page 14: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

[email protected]://informatics.indiana.edu/rocha/i-bic

biologicallyInspired

computing

INDIANAUNIVERSITY

Informatics luis rocha 2015

Filling planes and volumesPeano and Hilbert Curves

Peano

Hilbert

Page 15: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

fractal features

Self-similarity on multiple scales Due to recursion

Fractal dimension Enclosed in a given space, but with infinite

number of points or measurement

Page 16: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

[email protected]://informatics.indiana.edu/rocha/i-bic

biologicallyInspired

computing

INDIANAUNIVERSITY

Informatics luis rocha 2015

fractal-like designs in Naturereducing volume

How do these packed volumes and recursive morphologies grow?

Page 17: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

What about our plant? An Accurate Model

Requires Varying angles Varying stem

lengths randomness

The Fibonacci Model is similar Initial State: b b -> a a -> ab

sneezewort

Psilophyta/Psilotum

bab

bb

bb

bb b

aa

aa

a aa

Page 18: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

L-Systems

Mathematical formalism proposed by the biologist Aristid Lindenmayer in 1968 as a foundation for an axiomatic theory of biological development. applications in computer graphics

Generation of fractals and realistic modeling of plants

Grammar for rewriting Symbols Production Grammar Defines complex objects by

successively replacing parts of a simple object using a set of recursive, rewriting rules or productions. Beyond one-dimensional

production (Chomsky) grammars Parallel recursion Access to computers

Page 19: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

L-systems

An L-system is an ordered triplet G = <V, w, P>

V = alphabet of the symbols in the system V = {F, B}

w = nonempty word the axiom: B

P = finite set of production rules (productions) B → F[-B][+B] F → FF

formal notation of the production system

Page 20: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

branching L-Systems

Add branching symbols [ ] Main trunk shoots off one

side branch simple example

Angle 45 Axiom: F

Seed Cell Rule: F=F[+F]F

Deterministic, context-free L-systems Simplest class of L-

systems Simple re-writing D0L

F F[+F]

production rules for artificial plants

Page 21: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

L-system with 2 cell types

Axiom B

Cell Types B,F

Rules B → F[-B][+B] F → FF

Depth Resulting String0 B

1 F[-B]+B

2 FF[-F[-B]+B]+ F[-B]+B

3 FFFF[-FF[- F[-B]+B]+ FF[-B]+B]+ F[- F[-B]+B]+ F[-B]+B

Page 22: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

parametric L-systems

Discrete nature of L-systems makes it difficult to model continuous phenomena Numerical parameters are

associated with L-system symbols

Parameters control the effect of productions

A ( t ) B ( t x 3) Growth can be modulated by

time Varying length of braches,

rotation degrees

Page 23: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

[email protected]://informatics.indiana.edu/rocha/i-bic

biologicallyInspired

computing

INDIANAUNIVERSITY

Informatics luis rocha 2015

exampleparametric L-system

operate on parametric words, which are strings of modules consisting of symbols with associated parameters and their rules

From: P. Prusinkiewicz and A. Lindenmayer [1991]. The Algorithmic Beauty of Plants.

Page 24: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

stochastic L-systems

Probabilistic production rules A B C ( P = 0.3 ) A F A ( P = 0.5 ) A A B ( P = 0.2 )

http://coco.ccu.uniovi.es/malva/sketchbook/

Page 25: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

Context-sensitive L-systems

Production rules depend on neighbor symbols in input string simulates interaction between different parts

necessary to model information exchange between neighboring components

2L-Systems P: al < a > ar X

P1: A<F>A A P2: A<F>F F

1L-Systems P: al < a X or P: a > ar X

Generalized to IL-Systems (k,l)-system

left (right) context is a word of length k(l)

2L-Systems

Page 26: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

[email protected]://informatics.indiana.edu/rocha/i-bic

biologicallyInspired

computing

INDIANAUNIVERSITY

Informatics luis rocha 2015

exampleparametric 2L-system

convenient tool for expressing developmental models with diffusion of substances. pattern of cells in Anabaena catenula and other blue-green bacteria

From: P. Prusinkiewicz and A. Lindenmayer [1991]. The Algorithmic Beauty of Plants.

Page 27: lecture 6 - Department of Informatics · 2015. 12. 14. · rocha@indiana.edu biologically Inspired computing INDIANA UNIVERSITY Informatics luis rocha 2015 biologically-inspired

biologicallyInspired

computing

[email protected]://informatics.indiana.edu/rocha/i-bic

INDIANAUNIVERSITY

Informatics luis rocha 2015

Next lectures

Class Book Nunes de Castro, Leandro [2006]. Fundamentals of Natural

Computing: Basic Concepts, Algorithms, and Applications. Chapman & Hall. Chapter 7, sections 7.1, 7.2 and 7.4 – Fractals and L-Systems Appendix B.3.1 – Production Grammars

Lecture notes Chapter 1: What is Life? Chapter 2: The logical Mechanisms of Life Chapter 3: Formalizing and Modeling the World

posted online @ http://informatics.indiana.edu/rocha/i-bic Papers and other materials

Logical mechanisms of life (H400, Optional for I485) Langton, C. [1989]. “Artificial Life” In Artificial Life. C. Langton

(Ed.). Addison-Wesley. pp. 1-47. Optional

Flake’s [1998], The Computational Beauty of Life. MIT Press. Chapter 1 – Introduction Chapters 5, 6 (7-9) – Self-similarity, fractals, L-Systems

Prusinkiewicz and Lindenmeyer [1996] The algorithmic beautyof plants.

Chapter 1

readings