Aftificial Life: Celular Automata Dr. Shazzad Hosain Department of EECS North South Universtiy

Slides:



Advertisements
Similar presentations
Cellular Automata Various credits for these slides: Ajit Narayanan, Rod Hunt, several more.
Advertisements

Sharks and Fishes – The problem
Games as Emergent Systems first schema on “rules”.
Cellular Automata: Life with Simple Rules
Cellular Automata COMP308 Unconventional models and paradigms.
Game of Life Rules and Games Linh Tran ECE 573. What is Life? Life is just one example of a cellular automaton, which is any system in which rules are.
CITS4403 Computational Modelling Game of Life. One of the first cellular automata to be studied, and probably the most popular of all time, is a 2-D CA.
Game of Life Courtesy: Dr. David Walker, Cardiff University.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Introduction to Parallel Processing Final Project SHARKS & FISH Presented by: Idan Hammer Elad Wallach Elad Wallach.
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.
Cellular Automata (Reading: Chapter 10, Complexity: A Guided Tour)
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
Creating new worlds inside the computer COS 116: 2/14/2008 Sanjeev Arora.
CELLULAR AUTOMATON Presented by Rajini Singh.
Emulating Physics Our goal will be to show how basic dynamics known from physics can be formulated using local simple rules of cellular automata: diffusion.
An Introduction to Cellular Automata
Joanne Turner 15 Nov 2005 Introduction to Cellular Automata.
Lectures on Cellular Automata Continued Modified and upgraded slides of Martijn Schut Vrij Universiteit Amsterdam Lubomir Ivanov Department.
Today’s Plan Introduction to Artificial Life Cellular Automata
Cellular Automata Orit Moskovich
Cellular Automata This is week 7 of Biologically Inspired Computing Various credits for these slides, which have in part been adapted from slides by:
Introduction At the heart of the growth of a multi-cellular organism is the process of cellular division… … aka (in computing) self-replication.
A New Kind of Science in a Nutshell David Sehnal QIPL at FI MU.
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.
Creating new worlds inside the computer COS 116, Spring 2012 Adam Finkelstein.
CITS4403 Computational Modelling Fractals. A fractal is a mathematical set that typically displays self-similar patterns. Fractals may be exactly the.
Chapter 12: Simulation and Modeling
The Role of Artificial Life, Cellular Automata and Emergence in the study of Artificial Intelligence Ognen Spiroski CITY Liberal Studies 2005.
1 Cellular Automata. 2 Introduction What are Cellular Automata? CA are discrete dynamic systems. CA's are said to be discrete because they operate in.
Multiscale Modelling Mateusz Sitko
Complex systems complexity chaos the butterfly effect emergence determinism vs. non-determinism & observational non-determinism.
Governor’s School for the Sciences Mathematics Day 13.
CS 484 – Artificial Intelligence1 Announcements Lab 4 due today, November 8 Homework 8 due Tuesday, November 13 ½ to 1 page description of final project.
1 Data Structures CSCI 132, Spring 2014 Lecture 3 Programming Principles and Life Read Ch. 1.
Course material – G. Tempesti Course material will generally be available the day before the lecture Includes.
1 Cellular Automata and Applications Ajith Abraham Telephone Number: (918) WWW:
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
Activity 2-1: The Game of Life
Introduction to Lattice Simulations. Cellular Automata What are Cellular Automata or CA? A cellular automata is a discrete model used to study a range.
Fractals. In colloquial usage, a fractal is "a rough or fragmented geometric shape that can be subdivided in parts, each of which is (at least approximately)
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.
Trust Propagation using Cellular Automata for UbiComp 28 th May 2004 —————— Dr. David Llewellyn-Jones, Prof. Madjid Merabti, Dr. Qi Shi, Dr. Bob Askwith.
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.
Cellular Automata. John von Neumann 1903 – 1957 “a Hungarian-American mathematician and polymath who made major contributions to a vast number of fields,
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.
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.
Cellular Automata Biologically Inspired Computing Various credits for these slides, which have in part been adapted from slides by: Ajit Narayanan, Rod.
A few of the people involved and what they’ve done.
Cellular Automata This is week 7 of Biologically Inspired Computing Various credits for these slides, which have in part been adapted from slides by:
TRU-COMP3710 Artificial Life and Emergent Behavior1 Course Outline Part I – Introduction to Artificial Intelligence Part II – Classical Artificial Intelligence.
Strategies and Rubrics for Teaching Chaos and Complex Systems Theories as Elaborating, Self-Organizing, and Fractionating Evolutionary Systems Fichter,
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.
Modelagem Dinâmica com TerraME Aula 5 – Building simple models with TerraME Tiago Garcia de Senna Carneiro (UFOP) Gilberto Câmara (INPE)
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.
Artificial Life and Emergent Behavior
Spatio-Temporal Information for Society Münster, 2014
Pedro Ribeiro de Andrade Münster, 2013
Illustrations of Simple Cellular Automata
Cellular Automata + Reaction-Diffusion Systems
Alexei Fedorov January, 2011
Cellular Automata.
Spatio-temporal information in society: cellular automata
Artificial Life and Emergent Behavior
Presentation transcript:

Aftificial Life: Celular Automata Dr. Shazzad Hosain Department of EECS North South Universtiy

Defining Artificial Life Definition the analysis and study of life and life-like processes in man-made systems through the use of simulation and synthesis Why? Broaden understanding of what life is by building it artificially Explore synthetic evolution Life-as-it-could-be vs Life-as-we-know-it

Defining Life The problem of defining what life “is” Life is built by simple, non-living components Yet it appears to be more than the mere sum of their interaction Traditional definitions Aristotle, the Greek philosopher, said A thing was alive if it could “nourish itself and decay” Certain properties are considered to be indicative of life Self-reproduction Ability to evolve by Darwinian natural selection Response to stimuli Ability to die Growth or expansion

Emergent Behavior The idea of emergent behavior is fundamental to the field of Artificial life (Alife) Boids system Model the flocking behavior of birds, using two simple rules One rule: each boid would stay near to other boids by having each boid tend to move toward the center of gravity of the whole flock Another rule: boids did not collide each other Boids move extremely similar way in which flock of birds or shoals of fish move Simulated in pillar-shaped obstacles. Boids split into two separate flocks to go around the pillar, then rejoined

FSA is a simple device that has a finite set of states and an input string. Each input symbol is compared with a rule that dictates to move to the next state After reading the entire input FSA is either in an accepting state, which means the answer is yes or in some other state, which means answer is no Finite State Automata (FSA)

What is the language accepted by this machine? L = {a,b}* = all finite strings of a’s and b’s a,b

What is the language accepted by this machine? a,b

What is the language accepted by this machine? L = all even length strings of a’s and b’s a,b

What machine accepts this language? L = all strings in {a,b}* that contain at least one a a a,b b

What machine accepts this language? L = strings with an odd number of b’s and any number of a’s b a a b

What is the language accepted by this machine? L = any string ending with a b b b a a

Finite State Automata (FSA) Accepts even number of a Only two state, but could have large number of states Living entities might be considered as an FSA Boids can be though of as FSAs. Each boid has A set of inputs (its location, speeds, other boid location etc.) A state, which direction it is flying and how fast A set of rules, which state to move from each state, according to input data

Celular Automata: Conway's Life

Invention of Cellular Automata Invented by John von Neumann and Stanislaw Ulam at Los Alamos National Lab (early 1950s) Based on work by Alan Turing Most basic research on CA in the 1950s and 60s Three major events in CA research John von Neumann’s self-reproducing automaton John Conway’s Game of Life Stephen Wolfram’s classification of cellular automata

What is Cellular Automata? It is a model that can be used to show how the elements of a system interact with each other. Each element of the system is assigned a cell. The cells can be: – 2-dimensional squares, – 3-dimensional blocks – or another shape such as a hexagon.

Here is a 2-d model, with 256 cells, each cell in this example can be in either (0 or 1) state, State 1 is encoded with color black, 0 with white. Each cell has eight neighbors (excluding itself). Example of two-dimensional automation

A neighborhood function that specifies which of the cell’s adjacent cells affect its state. A transition function that specifies mapping from state of neighbor cells to state of given cell Cellular automation: the specification

Each cell has a defined neighborhood. For example, in a one dimension cellular automaton, a neighborhood of radius one for a given cell would include the cell to the immediate right and the cell to the immediate left. The cell itself may or may not be included in the neighborhood. Different models. (A,B,C,D,E,F,X) are cells Examples of neighborhoods

What is the main characteristics of Cellular Automata? Synchronous computation Infinitely-large grid: but finite occupancy, grows when needed Various dimensions (1D, 2D, 3D, …) Typically fine-grain If cells are distributed, they still need to communicate across boundaries; they communicate once per cycle.

What are the Applications of Cellular Automata? Universal computers (embedded Turing machines) Self-reproduction Diffusion equations Artificial Life Digital Physics

Some Examples of Application of CA: Simulation Models “Game of Life” Gas particles: Billiard-ball model Ising model: Ferro-magnetic spins Heat equation simulation Percolation models Wire models Lattice Gas models

The cells on the end may (or may not) be treated as "touching" each other as if the line of cells were circular. If we consider them as they touch each other, then the cell (A) is a neighbor of cell (C) One-Dimensional Cellular Automaton with Wrap- around

Life - Conway’s Game of Life John H. Conway

Life - The Game A cell dies or lives according to some transition rule The world is round (flips over edges) How many rules for Life? 20, 40, 100, 1000? T = 0T = 1 transition rules

Three simple rules dies if number of alive neighbour cells =< 2(loneliness) dies if number of alive neighbour cells >= 5(overcrowding) lives is number of alive neighbour cells = 3(procreation) Life - The Game

SOS - Lecture 4 Life - The Game Examples of the rules loneliness(dies if #alive =< 2) overcrowding(dies if #alive >= 5) procreation(lives if #alive = 3) Life - The Game

SOS - Lecture 4 Life - Patterns The transition rule for this example, is : a cell stays in state 1 (black), if it has two or three black neighbors. a cell changes to black, if it has exactly three black neighbors. Periodic

Cellular Automata - Introduction Now 1 second later Traditional science Newton laws states Heisenberg principle states that it is impossible to precisely know the speed and the location of a particle basis of quantum theory problem: detailed description of states impossible etc etc

“A CA is an array of identically programmed automata, or cells, which interact with one another in a neighborhood and have definite state” Beyond Life - Cellular Automata

“A CA is an array of identically programmed automata, or cells, which interact with one another in a neighbourhood and have definite state” Cellular Automata - Array HQMSWETG dimensional 2 dimensional O WJA R IT D GM XE NZ R P Cellular Automata - Array

“A CA is an array of identically programmed automata, or cells, which interact with one another in a neighbourhood and have definite state” SOS - Lecture 4 Cellular Automata - Cells if #alive =< 2, then die if #alive = 3, then live if #alive >= 5, then die if #alive =< 2, then die if #alive = 3, then live if #alive >= 5, then die if #alive =< 2, then die if #alive = 3, then live if #alive >= 5, then die Cellular Automata - Cells

“A CA is an array of identically programmed automata, or cells, which interact with one another in a neighborhood and have definite state” SOS - Lecture 4 Cellular Automata - Interaction Rules if #alive =< 2, then die if #alive = 3, then live if #alive >= 5, then die Cellular Automata - Interaction

“A CA is an array of identically programmed automata, or cells, which interact with one another in a neighborhood and have definite state” SOS - Lecture 4 Cellular Automata - Neighbourhood Neumann neighborhood Moore neighborhood Cellular Automata - Neighborhood

“A CA is an array of identically programmed automata, or cells, which interact with one another in a neighborhood and have definite state” SOS - Lecture 4 Cellular Automata - States 2 possible states: ON OFF O WJA R IT D GM XE NZ R P A Z 26 possible states: A … Z Never infinite! Cellular Automata - States

One difficulty with three-dimensional cellular automata is the graphical representation (on two-dimensional paper or screen) Example of a three-dimensional cellular automaton

In the initial configuration of the cellular automata, each cell is assigned a "starting" value from the range of possible values. For example, if the range of possible values is 0 or 1, then each cell would be assigned a 0 or a 1 in the initial configuration. Each value represents a color to the computer. Each cell is associated a transition rule. Example of description of a cellular automaton

Here is an example In this example, the initial configuration for all the cells is state 0, except for 4 cells in state 1. Initial Step1 Step2 The next slide shows animation for this example The transition rule for this example, is : a cell stays in state 1 (black), if it has two or three black neighbors. a cell changes to black, if it has exactly three black neighbors.

Classifying Cellular Automata Rules Stephen Wolfram Class One - Fixed or Static: Rules that produce dull universes, such as all dead cells or all living cells; e.g. ice. Class Two - Periodic or Oscillatory: Rules that produce stable, repetitive configurations. Class Three - Chaotic: Rules that produce chaotic patterns; e.g. molecules in a gas. Class Four - Complexity: Rules that produce complex, locally organized patterns; e.g. behave like a flowing liquid..

Let us now find some real-life examples!!!

Cellular Automata: Life with Simple Rules Sharks and Fish: Predator/Prey Relationships Based on the work of Bill Madden, Nancy Ricca and Jonathan Rizzo (Montclair State University) *Adapted from: Wilkinson,B and M. Allen (1999): Parallel Programming 2 nd Edition, NJ, Pearson Prentice Hall, p189 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

43 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

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

45 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.

46 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)

47 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, oFish breeding age >= 2, oShark breeding age >=3, and there are <4 of the other species: then create a species of that type o+1= baby fish (age = 1 at birth) o-1 = baby shark (age = |-1| at birth)

48 Breeding Rule: Before EMPTY

49 Breeding Rule: After

50 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

51 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

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

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

54 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

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

56 Generation: 0 Fish: red; sharks: yellow; empty: black

57 Generation: 100 Fish: red; sharks: yellow; empty: black

58 Generation: 500 Fish: red; sharks: yellow; empty: black

59 Generation: 1,000 Fish: red; sharks: yellow; empty: black

60 Generation: 2,000 Fish: red; sharks: yellow; empty: black

61 Generation: 4,000 Fish: red; sharks: yellow; empty: black

62 Generation: 8,000 Fish: red; sharks: yellow; empty: black

63 Generation: 10,500 Fish: red; sharks: yellow; empty: black

References Chapter 13 of “AI Illuminated” by Ben Coppin.