32
Trajectories and attractor Trajectories and attractor basins as a behavioral basins as a behavioral description and evaluation description and evaluation criteria for artificial criteria for artificial EvoDevo systems EvoDevo systems Stefano Nichele – October 14, 2009 Stefano Nichele – October 14, 2009 UNIVERSITA’ DEGLI STUDI DELL’INSUBRIA Facoltà di Scienze MM.FF.NN. Corso di Laurea Specialistica in Informatica NORWEGIAN UNIVERSITY OF SCIENCE AND TECHNOLOGY Department of Computer and Information Science Master’s Thesis in Computer Science SUPERVISORS: Prof. Gunnar Tufte (NTNU) Prof. Claudio Gentile (Insubria)

Trajectories and attractor basins as a behavioral description and evaluation criteria for artificial EvoDevo systems Stefano Nichele – October 14, 2009

Embed Size (px)

Citation preview

Trajectories and attractor basins as a Trajectories and attractor basins as a behavioral description and evaluation behavioral description and evaluation criteria for artificial EvoDevo systemscriteria for artificial EvoDevo systems

Stefano Nichele – October 14, 2009Stefano Nichele – October 14, 2009

UNIVERSITA’ DEGLI STUDI DELL’INSUBRIAFacoltà di Scienze MM.FF.NN.

Corso di Laurea Specialistica in Informatica

NORWEGIAN UNIVERSITY OF SCIENCE AND TECHNOLOGY

Department of Computer and Information Science

Master’s Thesis in Computer Science

SUPERVISORS: Prof. Gunnar Tufte (NTNU)Prof. Claudio Gentile (Insubria)

IntroductionVon Neumann architecture: 1 central processor

Cellular Computing: • vast amount of simple elements• parallel computation• local interconnections (neighbors)• massive computation power, hard to exploit

New approach:• Evolutionary Algorithms inspired by nature (to handle complexity)

HW: Field Programmable Gate Arrays (FGPAs)

SW: Cellular Automata (CAs) with Genetic Algorithms (GAs)

IntroductionVon Neumann architecture: 1 central processor

Cellular Computing: • vast amount of simple elements• parallel computation• local interconnections (neighbors)• massive computation power, hard to exploit

New approach:• Evolutionary Algorithms inspired to nature (to handle complexity)

HW: Field Programmable Gate Arrays (FGPAs)

SW: Cellular Automata (CAs) with Genetic Algorithms (GAs)

Highly research oriented project.

Main long term goal: • Computation beyond today’s machines and technology • Exploiting biologically inspired principles• Rethinking the fundamentals of computation

Project work:• Develop an Evolutionary Algorithm that can find CA rules to produce a specified trajectory• Investigate different time scales, timing paradigms and state abstractions

Bio-Inspired SystemsIs it possible to build computers that are intelligent and alive?

• Yes, if they are inspired by biology and they include the concept of evolution

Darwin’s theory (On the Origin of Species, 1859)• evolution based on: “...one general law, leading to the advancement of all organic beings, namely, multiply, vary, let the strongest live and the weakest die.’’

Genotype and phenotype

• the Genome (DNA) contains the entire plan of the organism, the Phenotype

Evolution:

• generate a population, search for fit elements, let them reproduce to generate the next generation individuals (crossover), iterate for several generation

Amorphous computing and cellular machines

• small unreliable parts called cells lead to a robust and scalable system

Cellular Automata (Ulam – Von Neumann, 1940s)

• Formal Definition

• Uniform CA

• Non-Uniform CA

• Rules reduction

Countable array of discrete cells i

Discrete-time update rule Φ (operating in parallel on local neighborhoods of a given radius r)

Alphabet: σit {0, 1,..., k- 1 } ≡ ∈ A

Update function: σit + 1 = Φ(σi - r

t , …., σi + rt)

st ∈ AN

Global update Φ: AN → AN

st = Φ st - 1

Cellular Automata (Ulam – Von Neumann, 1940s)

t=0

t=1

t=k

= 1

= 0

0 0 0 1 1 1 1 0

Cellular Automata (Ulam – Von Neumann, 1940s)

Cellular Automata (Ulam – Von Neumann, 1940s)

RULE CODE (INDEX)

OPERATION PERFORMED

0 Identity of value C

1 Identity of value L

2 Identity of value R

3 OR between L and C

4 OR between C and R

5 OR between L and R

6 XOR between L and C

7 XOR between C and R

8 XOR between L and R

9 NAND between L and C

10 NAND between C and R

11 NAND between L and R

Genetic Algorithms1. Generate a random initial population of M individuals.

Repeat the following for N generations:

2. Calculate the fitness of each individual in the population.

3. Repeat until the new population has M individuals:

a.

b.  

c. Mutate each value in the offspring with a small probability.

d. Put the offspring in the new population.

4. Go to step 2 with the new population.

Discrete Dinamics & Basins of Attraction

Boolean Network and Random BooleanNetwork

Used to represent CA state-space

Discrete Dinamics & Basins of Attraction

Cellular Automaton of size N

State-space: 2N states (all the possible bitstrings of size N)

Trajectory: described graphically by a Random Boolean Network

Code Development

C language

• Engine for Uniform CA

• Engine for Non Uniform CA

• Genetic Algorithm for Uniform CA

• Genetic Algorithm for Non Uniform CA

Code Development

C language

• Engine for Uniform CA

• Engine for Non Uniform CA

• Genetic Algorithm for Uniform CA

• Genetic Algorithm for Non Uniform CA

Code Development

C language

• Engine for Uniform CA

• Engine for Non Uniform CA

• Genetic Algorithm for Uniform CA

• Genetic Algorithm for Non Uniform CA

Code Development

C language

• Engine for Uniform CA

• Engine for Non Uniform CA

• Genetic Algorithm for Uniform CA

• Genetic Algorithm for Non Uniform CA

Experimental SetupCA characteristics

Automaton type uniform or non-uniformNumber of cells size of the CANumber of evolution steps number of cycles from the initial state to the final stateFixed initial state initial configuration of the CADesired final state final configuration of the CA

Mean number of crossovers average number of crossover needed to find the solutionVariance measure of statistical dispersionStandard deviation square of the variance, another measure of statistical dispersionMinimum number of crossovers minimum valueMaximum number of crossovers maximum value

Results after the simulation

Most important index: number of required crossovers Relevant measure of the effectiveness and the speed of the GA

Large Standard deviation: volatile results , they tend to vary quite often

Results and Analysis - 1Automaton type 1 dimension uniform CA

Number of cells 65, 129, 257

Number of evolution steps 64

Fixed initial state 00000000000000000000000000000000100000000000000000000000000000000

Desired final state Obtained with rule 30

100 simulations

The rule n. 30 is supposed to be hard to find because it shows an aperiodic behavior and after a certain number of steps it is generating a unique sequence that cannot be produced by any other rule, starting from the same initial configuration. It is often used for random number generation

Results and Analysis - 2INITIAL STATE ----- n steps -----> INTERMEDIATE STATE ----- n steps -----> FINAL STATE

Automaton type 1 dimension uniform CANumber of cells 65Number of evolution steps 64

Fixed initial state00000000000000000000000000000000100000000000000000000000000000000

Desired intermediate state(at evolution step n. 32)

01101111001101001110100101111000001111000001111011010101111111110

Desired final state00100110010100000010100000010100101011111001011101101001110101100

Mean number of crossovers 692,740 (2.946,840)Computation time ~ 26 seconds (~ 138 seconds)

Results and Analysis - 2INITIAL STATE ----- n steps -----> INTERMEDIATE STATE ----- n steps -----> FINAL STATE

Automaton type 1 dimension uniform CANumber of cells 65Number of evolution steps 64

Fixed initial state00000000000000000000000000000000100000000000000000000000000000000

Desired intermediate state(at evolution step n. 32)

01101111001101001110100101111000001111000001111011010101111111110

Desired final state00100110010100000010100000010100101011111001011101101001110101100

Mean number of crossovers 692,740 (2.946,840)Computation time ~ 26 seconds (~ 138 seconds)

Results and Analysis - 2INITIAL STATE ----- n steps -----> INTERMEDIATE STATE ----- n steps -----> FINAL STATE

Automaton type 1 dimension uniform CANumber of cells 65Number of evolution steps 64

Fixed initial state00000000000000000000000000000000100000000000000000000000000000000

Desired intermediate state(at evolution step n. 32)

01101111001101001110100101111000001111000001111011010101111111110

Desired final state00100110010100000010100000010100101011111001011101101001110101100

Mean number of crossovers 692,740 (2.946,840)Computation time ~ 26 seconds (~ 138 seconds)

Surprising result!

Weight parameter introduced for the fitness function.

Lot of importance is given to the first intermediate state in the trajectory.

If the intermediate state is found, the rule is close to the correct one with a high degree of probability

Results and Analysis - 3rule 238 - 11101110 rule 252 - 11111100

Results and Analysis - 3rule 238 - 11101110 rule 252 - 11111100

Results and Analysis - 4rule 206 - 11001110 rule 238 - 11101110

Results and Analysis - 4rule 206 - 11001110 rule 238 - 11101110

Results and Analysis - 4rule 206 - 11001110 rule 238 - 11101110

Results and Analysis - 5Automaton type 1 dimension uniform CANumber of cells 65Number of evolution steps 65

Fixed initial state00000000000000000000000000000000100000000000000000000000000000000

First intermediate state (between step 10 and 20) 00000000000000000011111111111111100000000000000000000000000000000

Second intermediate state(between step 40 and 50)

11111111111111111111111111111111100000000000000000001111111111111

Desired final state11111111111111111111111111111111101111111111111111111111111111111

Mean number of crossovers 120,550Computation time ~ 7,661 seconds

Obtained rule 206 (11001110)

Results and Analysis - 5Automaton type 1 dimension uniform CANumber of cells 65Number of evolution steps 65

Fixed initial state00000000000000000000000000000000100000000000000000000000000000000

First intermediate state (between step 10 and 20) 00000000000000000011111111111111100000000000000000000000000000000

Second intermediate state(between step 40 and 50)

11111111111111111111111111111111100000000000000000001111111111111

Desired final state11111111111111111111111111111111101111111111111111111111111111111

Mean number of crossovers 120,550Computation time ~ 7,661 seconds

Obtained rule 206 (11001110)

Results and Analysis - 6Automaton type 1 dimension non-uniform CANumber of cells 129Number of evolution steps 64

Fixed initial state000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

Desired final state011011110011010011101001011110010010111110010010110011110111101010101111100101110110100010010111100010010001100101111111111111110

State-space for this experiment is 12 ^ 129 (number of possible rule-sets = 1,6 X 10 ^ 139) In the worst simulation the solution is found after ~ 190.000 GA evolution cycles

Results and Analysis - 6

In general, uniform VS non-uniform CAs:

•Size of the State-space

•Different dependency between genes

•Usually more crossovers are required…but not always

Results and Analysis - 7Automaton type 1 dimension non-uniform CANumber of cells 17Number of evolution steps 64

Fixed initial state 00000000100000000

First intermediate state(at evolution step 15) 01100110001100110

Second intermediate state(at evolution step 45)

01100110001100110

Desired final state 00000101010100000

Mean number of crossovers 2.548,410

Variance 6.454.467,000

Standard deviation 2.540,564

Minimum number of crossovers 479,000

Maximum number of crossovers 23.621,000

Computation time ~ 72 seconds

3 10 6 7 0 8 9 8 7 10 10 1 4 6 7 9 0 0 10 6 4 1 2 9 9 6 9 7 11 0 6 10 6 4 0 7 9 2 3 8 9 10 6 10 10 1 4 0 10 6 7 3 10 6 4 6 2 9 10 6 9 1 10 2 6 7 9 7 3 7 9 4 1 11 2 10 6 9 10 8 4 1 10 6 4 1 10 6 7 3 2 2 10 7 9 10 1 4 0 7 9 2

0 10 6 0 0 9 6 10 6 11 1 11 0 1 7 9 7 0 10 6 7 6 8 2 10 6 2 7 11 2 3 10 6 0 0 10 6 0 3 5 9 10 6 11 1 5 4 3 10 6 7 0 10 6 7 1 2 9 8 6 2 10 3 4 3 10 6 7 6 10 6 0 0 5 9 11 6 9 10 5 0 0 10 6 2 6 10 6 7 6 11 6 10 6 11 10 5 4 6 10 6 7

With a reduced size of the CA it is possible to find rule-sets that, starting from a symmetric state, can break the symmetry and then reach a symmetric state again twice, before reaching another symmetric final state.

After 100 simulations the mean number of iterations of the GA is 2.548,41. This is a very low value compared to the search space of size 12^17.

Conclusion & Future WorkIt is possible to use some of the principles of life, evolution and adaptation in machines.

• Use of GA to find CA rules that can follow a specified trajectory can be a remarkable approach. The search-space is beyond the current computational resources, exhaustive research techniques cannot be adopted

• Positive results with uniform cellular automata, even with complex trajectories and with non uniform cellular automata (with specified initial and final state)

• Further investigation is required for non uniform CA with complex trajectories (specifying intermediate states and time intervals)

• It is possible to graphically visualize the trajectories and attractor basins of cellular automata using tools for the analysis of RBNs

Possible future researches:

• Analysis of 2-dimensional cellular automata• In depth analysis of GA to find rules for non-uniform CA• Modification and further tuning of the Genetic Algorithm• Scaling the problem, investigating CAs of bigger size• Implementation of the CAs in hardware

THANKSTHANKS

Stefano NicheleStefano [email protected]

[email protected]

+39 347 5501807+39 347 5501807www.nichele.eu