1 1 2 What is a Cellular Automaton? A one-dimensional cellular automaton (CA) consists of two things: a row of "cells" and a set of "rules". Each of.

Slides:



Advertisements
Similar presentations
Cellular Automata: Life with Simple Rules
Advertisements

Cellular Automata COMP308 Unconventional models and paradigms.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
1 The Game of Life Supplement 2. 2 Background The Game of Life was devised by the British mathematician John Horton Conway in More sophisticated.
Genetic Algorithms, Part 2. Evolving (and co-evolving) one-dimensional cellular automata to perform a computation.
Cellular Automata (Reading: Chapter 10, Complexity: A Guided Tour)
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
CELLULAR AUTOMATON Presented by Rajini Singh.
Genetic Algorithms and Their Applications John Paxton Montana State University August 14, 2003.
Based mostly on Dr. Richard Spillman class on Alternative Computing in
Joanne Turner 15 Nov 2005 Introduction to Cellular Automata.
Cellular Automata Based mostly on Dr. Richard Spillman class on Alternative Computing in Summer 2000.
Cellular Automata This is week 7 of Biologically Inspired Computing Various credits for these slides, which have in part been adapted from slides by:
A New Kind of Science Chapter 3 Matthew Ziegler CS 851 – Bio-Inspired Computing.
Nawaf M Albadia Introduction. Components. Behavior & Characteristics. Classes & Rules. Grid Dimensions. Evolving Cellular Automata using Genetic.
Parallelization: Conway’s Game of Life. Cellular automata: Important for science Biology – Mapping brain tumor growth Ecology – Interactions of species.
Discrete Time and Discrete Event Modeling Formalisms and Their Simulators Dr. Feng Gu.
1 Reasons for parallelization Can we make GA faster? One of the most promising choices is to use parallel implementations. The reasons for parallelization.
Genetic Algorithm.
Discovery of Cellular Automata Rules Using Cases Ken-ichi Maeda Chiaki Sakama Wakayama University Discovery Science 2003, Oct.17.
CS 484 – Artificial Intelligence1 Announcements Lab 4 due today, November 8 Homework 8 due Tuesday, November 13 ½ to 1 page description of final project.
Polynomial Discrete Time Cellular Neural Networks Eduardo Gomez-Ramirez † Giovanni Egidio Pazienza‡ † LIDETEA, POSGRADO E INVESTIGACION Universidad La.
Investigation of the Effect of Neutrality on the Evolution of Digital Circuits. Eoin O’Grady Final year Electronic and Computer Engineering Project.
1 Cellular Automata and Applications Ajith Abraham Telephone Number: (918) WWW:
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
Introduction to Lattice Simulations. Cellular Automata What are Cellular Automata or CA? A cellular automata is a discrete model used to study a range.
Aftificial Life: Celular Automata Dr. Shazzad Hosain Department of EECS North South Universtiy
Cellular Automata Spatio-Temporal Information for Society Münster, 2014.
CELLULAR AUTOMATA A Presentation By CSC. OUTLINE History One Dimension CA Two Dimension CA Totalistic CA & Conway’s Game of Life Classification of CA.
Cellular Automata Martijn van den Heuvel Models of Computation June 21st, 2011.
The Game of Life Erik Amelia Amy. What is the “Game of Life?” The “Game of Life” (often referred to as Life) is not your typical game. There are no actual.
Model Iteration Iteration means to repeat a process and is sometimes referred to as looping. In ModelBuilder, you can use iteration to cause the entire.
1/27 Discrete and Genetic Algorithms in Bioinformatics 許聞廉 中央研究院資訊所.
George F Luger ARTIFICIAL INTELLIGENCE 5th edition Structures and Strategies for Complex Problem Solving Machine Learning: Social and Emergent Luger: Artificial.
The Science of Complexity J. C. Sprott Department of Physics University of Wisconsin - Madison Presented to the First National Conference on Complexity.
The Northern Lights: Demonstrations. Programmability Overview A major aspect of our project is programmability- it is an interactive display medium, the.
Cellular Automata FRES 1010 Eileen Kraemer Fall 2005.
Cellular Automata Introduction  Cellular Automata originally devised in the late 1940s by Stan Ulam (a mathematician) and John von Neumann.  Originally.
CS851 – Biological Computing February 6, 2003 Nathanael Paul Randomness in Cellular Automata.
Cellular Automata Biologically Inspired Computing Various credits for these slides, which have in part been adapted from slides by: Ajit Narayanan, Rod.
Cellular Automata This is week 7 of Biologically Inspired Computing Various credits for these slides, which have in part been adapted from slides by:
Conway’s Game of Life Jess Barak Game Theory. History Invented by John Conway in 1970 Wanted to simplify problem from 1940s presented by John von Neumann.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Chapter 14 Genetic Algorithms.
Selected Topics in CI I Genetic Programming Dr. Widodo Budiharto 2014.
Genetic Algorithms.
Chaotic Behavior - Cellular automata
Courtesy: Dr. David Walker, Cardiff University
Spatio-Temporal Information for Society Münster, 2014
Cellular automata.
Two-Dimensional Arrays
Artificial Intelligence Methods (AIM)
Chapter 3: Complex systems and the structure of Emergence
Illustrations of Simple Cellular Automata
Cellular Automata + Reaction-Diffusion Systems
Alexei Fedorov January, 2011
Topic 26 Two Dimensional Arrays
Cellular Automata.
Two-Dimensional Arrays
Spatio-temporal information in society: cellular automata
An Overview of Evolutionary Cellular Automata Computation
More 2 D Array.
Two-Dimensional Arrays
Searching for solutions: Genetic Algorithms
A Gentle introduction Richard P. Simpson
Machine Learning: UNIT-4 CHAPTER-2
Continue with Life, Magic and Catch -up
AP Java Learning Objectives
Activity 2-1: The Game of Life
Presentation transcript:

1 1

2 What is a Cellular Automaton? A one-dimensional cellular automaton (CA) consists of two things: a row of "cells" and a set of "rules". Each of the cells can be in one of several "states". The number of possible states depends on the automaton. Think of the states as colors. In a two-state automaton, each of the cells can be either black or white. Over time, the cells can change from state to state. The cellular automaton's rules determine how the states change. It works like this: When the time comes for the cells to change state, each cell looks around and gathers information on its neighbors' states. (Exactly which cells are considered "neighbors" is also something that depends on the particular CA.) Based on its own state, its neighbors' states, and the rules of the CA, the cell decides what its new state should be. All the cells change state at the same time.

3 3 Black = White 2 Black = Black 1 Black = Black 3 White = White Now make your own CA

4 2-Dimensional Automata 2-dimensional cellular automaton consists of an infinite (or finite) grid of cells, each in one of a finite number of states. Time is discrete and the state of a cell at time t is a function of the states of its neighbors at time t-1.

5 Conway’s Game of Life The universe of the Game of Life is an infinite two- dimensional grid of cells, each of which is either alive or dead. Cells interact with their eight neighbors.

6 6 Example of a Cellular Automata: Conway’s Life (Gardner, 1970)

7 Conway’s Game of Life At each step in time, the following effects occur: 1.Any live cell with fewer than two neighbors dies, as if by loneliness. 2.Any live cell with more than three neighbors dies, as if by overcrowding. 3.Any live cell with two or three neighbors lives, unchanged, to the next generation. 4.Any dead cell with exactly three neighbors comes to life. The initial pattern constitutes the first generation of the system. The second generation is created by applying the above rules simultaneously to every cell in the first generation -- births and deaths happen simultaneously. The rules continue to be applied repeatedly to create further generations.

8 Applications of Cellular Automata Simulation of Biological Processes Simulation of Cancer cells growth Predator – Prey Models Art Simulation of Forest Fires Simulations of Social Movement …many more.. It’s a very active area of research.

9 Cellular Automata: Life with Simple Rules Sharks and Fish: Predator/Prey Relationships Cellular automata can be used to model complex systems using simple rules. Key features* divide problem space into cells each cell can be in one of several finite states cells are affected by neighbors according to rules all cells are affected simultaneously in a generation rules are reapplied over many generations

10 Main idea Model predator/prey relationship by CA Define set of rules Begins with a randomly distributed population of fish, sharks, and empty cells in a 1000x2000 cell grid (2 million cells) Initially, –50% of the cells are occupied by fish –25% are occupied by sharks –25% are empty

11 Here’s the number 2 million Fish: red; sharks: yellow; empty: black

12 Rules A dozen or so rules describe life in each cell: birth, longevity and death of a fish or shark breeding of fish and sharks over- and under-population fish/shark interaction Important: what happens in each cell is determined only by rules that apply locally, yet which often yield long-term large-scale patterns.

13 Do a LOT of computation! Apply a dozen rules to each cell Do this for 2 million cells in the grid Do this for 20,000 generations Well over a trillion calculations per run! Do this as quickly as you can Initially cells contain fish, sharks or are empty Empty cells = 0 (black pixel) Fish = 1 (red pixel) Sharks = –1 (yellow pixel)

14 Rules in detail: Breeding Rule Breeding rule: if the current cell is empty If there are >= 4 neighbors of one species, and >= 3 of them are of breeding age, »Fish breeding age >= 2, »Shark breeding age >=3, and there are <4 of the other species: then create a species of that type »+1= baby fish (age = 1 at birth) »-1 = baby shark (age = |-1| at birth)

15 Breeding Rule: Before EMPTY

16 Breeding Rule: After

17 Rules in Detail: Fish Rules If the current cell contains a fish: Fish live for 10 generations If >=5 neighbors are sharks, fish dies (shark food) If all 8 neighbors are fish, fish dies (overpopulation) If a fish does not die, increment age

18 Rules in Detail: Shark Rules If the current cell contains a shark: Sharks live for 20 generations If >=6 neighbors are sharks and fish neighbors =0, the shark dies (starvation) A shark has a 1/32 (.031) chance of dying due to random causes If a shark does not die, increment age

19 Shark Random Death: Before I Sure Hope that the random number chosen is >.031

20 Shark Random Death: After YES IT IS!!! I LIVE

21 Programming logic Use 2-dimensional array to represent grid At any one (x, y) position, value is: –Positive integer (fish present) –Negative integer (shark present) –Zero (empty cell) –Absolute value of cell is age

22 Parallelism A single CPU has to do it all: –Applies rules to first cell in array –Repeats rules for each successive cell in array –After 2 millionth cell is processed, array is updated –One generation has passed –Repeat this process for many generations –Every 100 generations or so, convert array to red, yellow and black pixels and send results to screen

23 Parallelism How to split the work among 20 CPUs –1 CPU acts as Master (has copy of whole array) –18 CPUs act as Slaves (handle parts of the array) –1 CPU takes care of screen updates Problem: communication issue concerning cells along array boundaries among slaves

24 Send Right Boundary Values

25 Receive Left Boundary Values

26 Send Left Boundary Values

27 Receive Right Boundary Values

28 Send Right Boundary Values

29 Receive Left Boundary Values

30 Send Left Boundary Values

31 Receive Right Boundary Values

32 At intervals, update the master CPU has copy of entire array

33 Illustration Next several screens show behavior over a span of 10,000+ generations (about 25 minutes on a cluster of 20 processors )

34 Generation: 0

35 Generation: 100

36 Generation: 500

37 Generation: 1,000

38 Generation: 2,000

39 Generation: 4,000

40 Generation: 8,000

41 Generation: 10,500

42 Variations of Initial Conditions Still using randomly distributed populations: –Medium-sized population. Fish/sharks occupy: 1/16 th of total grid Fish: 62,703; Sharks: 31,301 –Very small population. Fish/sharks occupy: 1/800 th of total grid Initial population: Fish: 1,298; Sharks: 609

43 Generation Medium-sized population (1/16 of grid) Random placement of very small populations can favor one species over another Fish favored: sharks die out Sharks favored: sharks predominate, but fish survive in stable small numbers

44 Very Small Populations Random placement of very small populations can favor one species over another Fish favored: sharks die out Sharks favored: sharks predominate, but fish survive in stable small numbers

45 Elementary Cellular Automata As before think of every cell as having a left and right neighbor and so every cell and its two neighbors will be one of the following types Replace a black cell with 1 and a white cell with Every yellow cell above can be filled out with a 0 or a 1 giving a total of 2 8 =256 possible update rules.

46 This allows any string of eight 0s and 1’s to represent a distinct update rule Example: Consider the string it can be taken to represent the update rule Or equivalently Now think of as the binary expansion of the number = =106. So the update rule is rule # 106

47 Rule #45= = = Rule #30= = = This naming convention of the 256 distinct update rules is due to Stephen Wolfram. He is one of the pioneers of Cellular Automata and author of the book a New Kind of Science, which argues that discoveries about cellular automata are not isolated facts but have significance for all disciplines of science.

48 Computer processors CA processors are a physical, not software only, implementation of CA concepts, which can process information computationally. Processing elements are arranged in a regular grid of identical cells. The grid is usually a square tiling, or tessellation, of two or three dimensions; other tilings are possible, but not yet used. Cell states are determined only by interactions with the small number of adjoining cells. Cells interact, communicate, directly only with adjoining, adjacent, neighbor cells. No means exists to communicate directly with cells farther away. Cell interaction can be via electric charge, magnetism, vibration (phonons at quantum scales), or any other physically useful means. This can be done in several ways so no wires are needed between any elements.

49 APPLICATIONS Study of how genetic algorithms can evolve cellular automata to perform computations that require global coordination –emergent computation - actions of simple components with local information and communication produce coordinated global information processing –insect colonies, economic systems, the immune system, the brain, networked systems,...

50 1-d Binary State CAs One dimensional lattice of N two-state machines (cells) –each changes its state as a function only of the current states in a local neighborhood T=0 RULE TABLE: Neighborhood: Output bit: Size r = 1 neighborhood (nearest-neighbor) T=1

51 Computational Tasks A useful test problem for emergent computation is the density-classification task –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 –this is called the p c = 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 > p c –Is there a CA rule that will produce this behavior? –With only local information this is hard

52 Example GA On-going work at Santa Fe Institute by Mitchell, et. al. Initial attempts –GOAL: Search for a r=3 CA rule to perform the p c = 1/2 task –Use a CA with N=149 cells

53 Representation The GA rule structure consisted of the output bits of the rule table in binary order –bit 0 is the rule for the neighborhood, bit 1 is the output rule for the neighborhood, etc –chromosome size is 128 bits

54 Fitness Each rule in the population was run on a sample of 100 ICs randomly choosen –each CA was run until it arrives at a fixed point or for a maximum of M = 2N steps –fitness was the fraction of ICs which produced the correct final behavior –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

55 Parent Selection The population size was set at 100 The CAs were ranked in order of fitness The top 20% (elite rules) were passed to the next generation without modification The remaining 80% of the new population were produced using crossover between parents randomly selection from the elite rules

56 CrossOver/Mutation Single point crossover was used the offspring from each crossover were each mutated at exactly two randomly chosen positions

57 Results Each GA ran for a maximum of 100 generations While no general rule was discovered, the GA did find rules that worked on about 75% of the ICs