Trajectories and attractor basins as a behavioral description and evaluation criteria for artificial EvoDevo systems 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)
Introduction Von 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)
Introduction Von 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 Systems Is 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: σ i t ∈ {0, 1,..., k- 1 } ≡ A Update function: σ i t + 1 = Φ(σ i - r t, …., σ i + r t ) s t ∈ A N Global update Φ: A N → A N s t = Φ s t - 1
Cellular Automata (Ulam – Von Neumann, 1940s) t=0 t=1 t=k =1 =
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 11NAND between L and R
Genetic Algorithms 1.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: 2 N 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 Setup CA characteristics Automaton typeuniform or non-uniform Number of cellssize of the CA Number of evolution stepsnumber of cycles from the initial state to the final state Fixed initial stateinitial configuration of the CA Desired final statefinal configuration of the CA Mean number of crossoversaverage number of crossover needed to find the solution Variancemeasure of statistical dispersion Standard deviationsquare of the variance, another measure of statistical dispersion Minimum number of crossoversminimum value Maximum number of crossoversmaximum 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 - 1 Automaton type1 dimension uniform CA Number of cells65, 129, 257 Number of evolution steps64 Fixed initial state Desired final stateObtained with rule 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 - 2 INITIAL STATE n steps -----> INTERMEDIATE STATE n steps -----> FINAL STATE Automaton type1 dimension uniform CA Number of cells65 Number of evolution steps64 Fixed initial state Desired intermediate state (at evolution step n. 32) Desired final state Mean number of crossovers 692,740(2.946,840) Computation time ~ 26 seconds(~ 138 seconds)
Results and Analysis - 2 INITIAL STATE n steps -----> INTERMEDIATE STATE n steps -----> FINAL STATE Automaton type1 dimension uniform CA Number of cells65 Number of evolution steps64 Fixed initial state Desired intermediate state (at evolution step n. 32) Desired final state Mean number of crossovers 692,740(2.946,840) Computation time ~ 26 seconds(~ 138 seconds)
Results and Analysis - 2 INITIAL STATE n steps -----> INTERMEDIATE STATE n steps -----> FINAL STATE Automaton type1 dimension uniform CA Number of cells65 Number of evolution steps64 Fixed initial state Desired intermediate state (at evolution step n. 32) Desired final state 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 - 3 rule rule
Results and Analysis - 3 rule rule
Results and Analysis - 4 rule rule
Results and Analysis - 4 rule rule
Results and Analysis - 4 rule rule
Results and Analysis - 5 Automaton type1 dimension uniform CA Number of cells65 Number of evolution steps65 Fixed initial state First intermediate state (between step 10 and 20) Second intermediate state (between step 40 and 50) Desired final state Mean number of crossovers 120,550 Computation time~ 7,661 seconds Obtained rule 206 ( )
Results and Analysis - 5 Automaton type1 dimension uniform CA Number of cells65 Number of evolution steps65 Fixed initial state First intermediate state (between step 10 and 20) Second intermediate state (between step 40 and 50) Desired final state Mean number of crossovers 120,550 Computation time~ 7,661 seconds Obtained rule 206 ( )
Results and Analysis - 6 Automaton type1 dimension non-uniform CA Number of cells129 Number of evolution steps64 Fixed initial state Desired final state 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 ~ 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 - 7 Automaton type1 dimension non-uniform CA Number of cells17 Number of evolution steps64 Fixed initial state First intermediate state (at evolution step 15) Second intermediate state (at evolution step 45) Desired final state Mean number of crossovers2.548,410 Variance ,000 Standard deviation 2.540,564 Minimum number of crossovers479,000 Maximum number of crossovers23.621,000 Computation time~ 72 seconds 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 Work It 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
THANKS Stefano Nichele