Cellular Automata Based mostly on Dr Richard Spillman
Cellular Automata Based mostly on Dr. Richard Spillman class on Alternative Computing in Summer 2000
Overview Cellular Automata Quantum Evolutionary DNA Alt Comp
Review ßBinary Logic ßMultiple-Valued Logic ßReversible Logic ßAutomata - Finite State Machines ßCellular Automata ßIntroduction to Hardware Evolution ßReconfigurable Computing ßHardware Evolution Details Alt Comp
Idea – Genetic Algorithms A cyclic pattern of life ßThe Evolutionary Process: Selection Parents Crossover Population Replacement Alt Comp Mutation Offspring
Review – Cellular Automata ß Cellular Automata consist of: ßAn n-dimensional array of simple cells ßEach cell may in any one of k-states ßAt each tick of the clock a cell will change its state based on the states of the cells in a local neighborhood ßThe three main components of a Cellular Automata are: ßThe array dimension ßThe neighborhood structure ßThe transition rule Alt Comp Synchronous!!
OUTLINE ßSome Properties of CA ßCellular Automata Rules What an advanced class! Alt Comp ßGenetic Algorithms and Cellular Automata - their relations and possible extensions
Sipper Rules for Cellular Automata ßMoshe Sipper defines three principles of cellular computing ß Simplicity: Simplicity the basic processing element, the cell, is simple ß Vast Parallelism: Parallelism Cellular computing can involve 105 or more cells ß Locality: Locality all interactions take place on a purely local basis, a cell can communicate with a few other cells Alt Comp Cellular Computing = simplicity + vast parallelism + locality
Advantages of CAs ßCellular Automata offer many advantages over standard computing architecture including: ß Implementation: Implementation CAs require very few wires ß Scalability: Scalability It is easy to upgrade a CA by adding additional cells ß Robustness: Robustness CAs continue to perform even when a cell is faulty because the local connectivity property helps to contain the error Alt Comp Example of hypercube and Intel parallel processors
Applications of CAs ßCAs have been (or could be) used to solve a wide range of computing problems including: ß Image Processing: Processing Each cell correspond to an image pixel and the transition rule describe the nature of the processing task ß Random Number Generation: Generation CAs can generate large sequences of random numbers ß NP-Complete Problems: Problems CAs can address some of the more difficult problems in computer science Alt Comp
Possible Homeworks on CAs ßImage Processing: Processing ß 1. Design Cellular Architectures for various Edge Detection algorithms. ß 2. Design a Cellular Architecture for thinning. ß 3. Design a CA for finding a contour based on exoring. ßRandom Number Generation: Generation ß 1. Design a controlled random number generator with smaller aliasing rate than the architecture discussed in class (a linear counter based on shift register and EXOR gates). ßNP-Complete Problems: Problems ß 1. Design a CA for arbitrary NP-complete problem, such as graph coloring or satisfiability. Alt Comp
Another example of Cellular Automata Rules: legal rules of Wolfram ßThe transition rules define the operation of a cellular automata ßFor a 1 -d binary CA with a 3 -neighborhood (the right and left cells) there are 256 possible rules ßThese rules are divided into “legal” and “illegal” classes ßLegal rules must allow an initial state of all 0’s to remain at all 0’s ßLegal rules must be reflection symmetric ß 100 and 001 have identical values ß 110 and 011 have identical values Alt Comp ßThere are only 32 legal rules This is also done by Wolfram but different rule characterization than previously discussed here
How to study the behavior of One-Dimensional Rules? Other work of Wolfram ßThe performance of rules are studied in two ways: ß 1. By their impact on a CA with an initial state of a single 1 cell ß 2. By their impact on a CA with a random initial state ßWolfram has determined the behavior of all 32 legal rules, ß starting with an initial state of a single 1 cell Alt Comp
Example: cyclicity of Phenotype abc Y 000 0 ßConsider rule 18: 0 1 0 0 0 001 1 We start from a single alive cell 010 0 011 0 100 1 101 0 110 0 Identical Alt Comp 111 0
One area of study: Rule Comparison on initial conditions ßOne method of comparing different CA rules involves looking at the behavior of the rule on two similar initial conditions ßDoes the rule produce similar patterns or does it produce completely different patterns? ßA convenient measure of distance between binary cellular automata configurations is the “Hamming Distance” ßIt’s the number bits which differ between two binary strings Alt Comp 10011010 01111000 x x =4
Example One - the same rule on different initial data 001 010 011 100 101 110 111 ß Consider Rule 90: 000 0 1 1 0 Hamming Distance 1 01 1000 1 10 00 0110101 10 0 0 11 1101 1 11 0 0 1110001110 0 2 10 0101 0 01 1 1 1011011011 1 2 11 1000 1 11 0 0 101101101 0 0 4 10 1101 1 1 001101100 1 1 2 10 1101 1 01 0 0 1111011111 1 4 00 1101 1 0001010000 0 4 Rule 90 Alt Comp
Example Two ß Now try Rule 126: 000 001 010 011 100 101 110 111 0 1 1 1 0 Hamming Distance 1 01 1000 0110101 100 0 11 1101 1 110 0 111110 0 1 10 0111 0 011 1 1000000011 1 3 11 1101 1 110 0 1100000110 0 4 10 0111 0 011 1 1110001111 1 7 11 1101 1 110 0 0011011000 0 4 10 0111 0 011 1 0111111100 0 8 Complex rules (like 126) are more sensitive to the initial condition than simple rules (like 90) Alt Comp Averaged over more examples
Possible Homeworks • 1. Perform Wolfram-like analysis of rules for twodimensional CAs. • 2. • a) Find Complex rules for 2 D CA (like an equivalent of rule 126 in 1 D CAs) • b) and show that they are more sensitive to the initial condition than simple rules (like rule 90 in 1 D CAs) • 3. Can we link the “sensitivity” to the “interestingness” defined by us in the project? Alt Comp
Two Dimensional CAs ßTwo-dimensional cellular automata seem to model many physical processes such as: ßCrystal growth ßDiffusion systems ßTurbulent flow patterns ßLike 1 -d systems, 2 -d CAs have transition rules: ßA von Neumann neighborhood rule looks like: qi, j(t+1) = f[qi, j(t), qi+1, j(t), qi-1, j(t), qi, j-1(t), qi, j+1(t)] Alt Comp Observe that sometimes the cell itself is included to the neighborhood in definitions and sometimes it is not.
How many 2 -d Rules for various types and sizes of neighborhoods? ßThe number of possible 2 -d rules is quite large making a study of each individual rule impossible. ßFor example: 35 = 32 ßThere are 232 or about 4 x 109 von Neumann rules ßThere are 2512 or about 10154 Moore rules ßHowever, some observations can be made Alt Comp ßSome rules produce regular patterns ßSome rules produce structures with dendritic boundaries ßSome rules produce slow growing patterns which tend to be circular
Example ß 2 -d binary von Neumann Cellular Automata with a mod 2 sum rule (only exoring) ß Start the array with a seed (a few 1’s) We are interested in the sequence of patterns produced by this rule as compared to other rules Alt Comp
Example: majority We want to change to all zeros if there is more zeros than ones globally and to all ones if there is more ones than zeros globally. This is a global problem but we want to use local rules. This may work only statistically for long arrays. ß 1 -d binary, 3 -input function majority As we see, r=1 -neighborhood does not work. r=1 Alt Comp As we see, r=6 -neighborhood does work in this case, but we can r=6 always create a longer array, so is not a general solution.
Some Links of GA and CA: Can we develop rules for density classification task using GA? ßA genetic algorithm could be used to find a rule which produces targeted behavior in a CA ßA useful test problem for emergent computation is the density-classification task ßPROBLEM FORMULATION: FORMULATION • if the initial configuration (IC) of cell states has a majority of 1’s then it should go to the fixed-point configuration of all 1’s in M steps, otherwise it should produce the fixed-point configuration of all 0’s in M steps. Observe that this is a global problem ßthis is called the pc = 1/2 task ßif p 0 is the density of 1’s in the IC then the all 1’s configuration should occur when p 0 > pc Alt Comp ßOPEN PROBLEM: Is there a CA rule that will produce this behavior? • Intuition: With only local information this is hard
Density-classification task. Work of M. Mitchell Example GA ßWork at Santa Fe Institute by Mitchell, et. al. ßInitial attempts Alt Comp ßGOAL: Search for a r=3 CA rule to perform the pc = 1/2 task ßUse a CA with N=149 cells What rules were found?
GA for the density-classification task Problem Representation for GA ßThe GA rule structure consisted of the output bits of the rule table in binary order ßThe r=3 neighborhood of a 1 -d CA consists of the 3 cells on each side of the target cell • bit 0 is the rule for the 0 0 0 0 neighborhood, • bit 1 is the output rule for the 0 0 0 1 neighborhood, • Etc. we have 27 bit combinations on 7 positions Alt Comp ßchromosome size is 128 = 27 bits
GA for the density-classification task Fitness function ßEach rule in the population was run on a sample of hundred ICs (initial conditions) randomly chosen ßeach CA was run until it arrives at a fixed point or for a maximum of M = 2 N steps ßfitness was the fraction of ICs which produced the correct final behavior Alt Comp ßA different sample was selected at each generation ßthe random sample was biased to insure that the density of 1’s varied from 0 to 1
GA for the density-classification task Parent Selection ßThe population size was set at one hundred ßThe CAs were ranked in order of fitness ßThe top 20% (elite rules) were passed to the next generation without modification. Elitism ßThe remaining 80% of the new population were produced using crossover between parents randomly selected from the elite rules Alt Comp
GA for the density-classification task Crossover/Mutation ßSingle point crossover was used ßthe offspring from each crossover were each mutated at exactly two randomly chosen positions Alt Comp Explain all these choices if not clear
GA for the density-classification task Results ßEach GA ran for a maximum of one hundred generations ßWhile no general rule was discovered, the GA did find rules that worked on about 75% of the ICs Your possible homework. Create majority function rules for various neighborhoods and see what will Alt Comphappen in simulation of your 1 -D CA
Similar Other CA-related Possible CA Focus Homeworks ßYou could look at the behavior of several rules in a 1 -d or 2 -d system ßFind patterns ßCompare the rules on the basis of there impact on small changes in the initial conditions ßBuild a GA to generate a CA ßLook into the connection between artificial life and cellular automata Alt Comp
Possible Homeworks ß 1. Create and specify CA with 3 D rules. How to implement them in know FPGAs? ß 2. Discuss such issues in von Neumann rules versus Moore rules ß 3. Build cells of CAs using Quantum Dot technology Alt Comp Off to work! Remember Final Exam Remember Homework-Project on GA and CA
- Slides: 30