Cellular Automata. Vit Krajcik krajcik@decef.elf.stuba.sk



Similar documents
Beginner s Matlab Tutorial

Data Storage 3.1. Foundations of Computer Science Cengage Learning

A Proposal for OpenEXR Color Management

SCAN-CA Based Image Security System

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Adding and Subtracting Positive and Negative Numbers

Machine Learning and Data Mining. Regression Problem. (adapted from) Prof. Alexander Ihler


MEASURES OF VARIATION

TImath.com Algebra 1. Absolutely!

I PUC - Computer Science. Practical s Syllabus. Contents

Virtual plants in high school informatics L-systems

One Dimension Array: Declaring a fixed-array, if array-name is the name of an array

Overview. Swarms in nature. Fish, birds, ants, termites, Introduction to swarm intelligence principles Particle Swarm Optimization (PSO)

Scope and Sequence KA KB 1A 1B 2A 2B 3A 3B 4A 4B 5A 5B 6A 6B

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

The following is an overview of lessons included in the tutorial.

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA

Comp 410/510. Computer Graphics Spring Introduction to Graphics Systems

5 Systems of Equations

What are the place values to the left of the decimal point and their associated powers of ten?

Digital Versus Analog Lesson 2 of 2


Visual Basic Programming. An Introduction

A Short Introduction to Computer Graphics

Reliably computing cellular automaton, in 1-sparse noise

Colour by Numbers Image Representation

16 21 Linear vs. Exponential.notebook May 14, LT 1c: I can compare linear vs. exponential change.

Samples of Allowable Supplemental Aids for STAAR Assessments. Updates from 12/2011

Genetic Algorithm Evolution of Cellular Automata Rules for Complex Binary Sequence Prediction

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

AC : MATHEMATICAL MODELING AND SIMULATION US- ING LABVIEW AND LABVIEW MATHSCRIPT

Variable: characteristic that varies from one individual to another in the population

How Does My TI-84 Do That

Cellular Automata. Course outline

Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering

Digital Image Fundamentals. Selim Aksoy Department of Computer Engineering Bilkent University

One-Minute Spotlight. The Crystal Ball Forecast Chart

Multivariate data visualization using shadow

Big Ideas in Mathematics

Numerical Analysis. Professor Donna Calhoun. Fall 2013 Math 465/565. Office : MG241A Office Hours : Wednesday 10:00-12:00 and 1:00-3:00

Formulas, Functions and Charts

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

DRAFT. Algebra 1 EOC Item Specifications

Prism 6 Step-by-Step Example Linear Standard Curves Interpolating from a standard curve is a common way of quantifying the concentration of a sample.

CALCULATIONS & STATISTICS

Properties of Stabilizing Computations

Everyday Mathematics CCSS EDITION CCSS EDITION. Content Strand: Number and Numeration

On General-purpose Textual Modeling Languages. On General-purpose Textual Modeling Languages

Prentice Hall Connected Mathematics 2, 7th Grade Units 2009

Everyday Mathematics GOALS

Determine If An Equation Represents a Function

User Recognition and Preference of App Icon Stylization Design on the Smartphone

The Utah Basic Skills Competency Test Framework Mathematics Content and Sample Questions

Object Recognition and Template Matching

Chapter 3 RANDOM VARIATE GENERATION

f(x) = g(x), if x A h(x), if x B.

ALGEBRA 2 CRA 2 REVIEW - Chapters 1-6 Answer Section

Clustering & Visualization

A method of generating free-route walk-through animation using vehicle-borne video image

Algebra 1: Basic Skills Packet Page 1 Name: Integers ( 30) ( 4)

Reflection and Refraction

Forschungskolleg Data Analytics Methods and Techniques

EL-9650/9600c/9450/9400 Handbook Vol. 1

Green = 0,255,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (43,215,35) Equal Luminance Gray for Green

4.4 Transforming Circles

Notes for EER #4 Graph transformations (vertical & horizontal shifts, vertical stretching & compression, and reflections) of basic functions.

Introduction to the TI-Nspire CX

Algebra I Vocabulary Cards

Definition 8.1 Two inequalities are equivalent if they have the same solution set. Add or Subtract the same value on both sides of the inequality.

Interactive Data Visualization for the Web Scott Murray

A System for Capturing High Resolution Images

Color image processing: pseudocolor processing

North Carolina Math 2

Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information.

Manual for simulation of EB processing. Software ModeRTL

KINECT PROJECT EITAN BABCOCK REPORT TO RECEIVE FINAL EE CREDIT FALL 2013

SQUARES AND SQUARE ROOTS

3515ICT Theory of Computation Turing Machines

Using Casio Graphics Calculators

Manual Software SPECTRO3-MONITORING V5.0

Activity 1: Solving a System of Linear Equations

Using MATLAB to Measure the Diameter of an Object within an Image

Basic Use of the TI-84 Plus

Lecture 9: Geometric map transformations. Cartographic Transformations

Descriptive Statistics

KEANSBURG SCHOOL DISTRICT KEANSBURG HIGH SCHOOL Mathematics Department. HSPA 10 Curriculum. September 2007

White Paper. "See" what is important

Raster Data Structures

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Imaging Systems Laboratory II. Laboratory 4: Basic Lens Design in OSLO April 2 & 4, 2002

Chapter One Introduction to Programming

NetBeans Profiler is an

Photoshop- Image Editing

Excel -- Creating Charts

Section 1. Inequalities

Scatter Plots with Error Bars

Transcription:

Cellular Automata Vit Krajcik krajcik@decef.elf.stuba.sk Faculty of Electrical Engineering and Information Technologies Slovak University of Technology Bratislava, Slovak Republic Abstract This paper deals with one approach designing complex biomorphical shapes by means of the evolutional processes, which are represented by the cellular automata with different types of cells. The paper describes a method for the definition the grammar and simulation of cellular array (transformation functions for reproduction, aging and dying), set up the initial state of cellular automata, graphic interpretation of cell states, and some experimental results. Keywords: Cellular automata, evolutiaonary process, grammar 1. Introduction Cellular automata have a broad spectrum of applications - from computer games, to the simulation physical, biological, and social precesses. For example, there are applications in archeology, where cellular automata is used for the re-construction of migration and evolution of the old cultures. In this case the simulation helps to predict the location of archaeological sites [3]. Theoretical base of cellular automatta statet John von Neumann, but the practical experiments were able when the computers became able to compute and visualize simulations. Cellular automata require large memory. This paper is part of the undergraduate course at the Department of Computer Science and Technology. The main goal of this project is to create a tool for automatic data base generation in the modelling and rendering complicated shapes. 2. Cellular automata Cellular automata in general, is the set of cells placed in a regular ortogonal n- dimensional grid. Single cell can reproduce, depending on its genetic code (rewriting rules), its state, and the state of neighbouring cells.

General definition of the automata is following. It is ordered base (A,S,U,p,v), where A is set of input symbols, S is set of states,u is set of output symbols, p and v are transformations. p : S x A -> S v : S -> U Transformation p is transition function and Transformation v is output function. Output function v assigns output symbol for each state. Transition function assigns change state to next state.transition functions are defined in a discrete time intervals t: s(t+1) = p( s(t), a(t) ) u(t) = v( s(t) ) where s(t+1), s(t) is from set of S a(t) is from set of A u(t) is from set of U This paper deals with two-dimension orhogonal cellular arry. 2.1 Neighbouring cells Two cells are neighbouring, if their absolute distance is less than 2 Example: In matrix array neighbours of cell with coordinates A(X,Y) are: B(X+1, Y ) C(X+1,Y+1) D( X,Y+1) E(X-1,Y+1) F(X-1, Y ) G(X-1,Y-1) H( X,Y-1) I(X+1,Y-1) d = sqrt( sqr( X - (x+1) ) + sqr( y - (y+1) ) ) d = sqrt( 1 + 1 ) d = 1,4142136...

,---,,---,,---, E D C \ /,---,,---,,---, F A B / \,---,,---,,---, G H I Each cell have eight neighbours. 2.2 States of the cells State of cell is represented by the integer number.state 0 is reserved for dead cell, and other states are aviable for use. Generally we can define arbitrary number of states for different cell behaviour, but if computer allow less colors, then different cells will have the same color on the computer monitor. Graphical representation of the cellular automata described in this paper is limited by 256 colors of the standard VESA video modes. 2.3 Graphical interpretation of the states Each state of the cell is represented by one color. The color is defined by three components: RED, GREEN, BLUE The value of colors for the particular state is calculated from the color values of the first and last state of the cell by the linear interpolation. Until now, five types of graphic cell interpretations were implemented: 1. point 2. filled square 3. filled square with variable size 4. filled circle 5. filled circle with variable size. Size is of the object is proportaionl to the screen resolution and the size of cellular array. Syntax: Cell : InitState : (R1,G1,B1)->(R2,G2,B2) ; where Cell is name of the cell, InitState is integer number from interval [0,MaxState] R1,G1,B1 color of the state 1 R2,G2,B2 color of the state MaxState

Example A : 1 : (1,1,1)->(1,1,255) : 2.4 Specification of transition functions Transition functions can be expressed by the rewriting rules in the form: Cell CellList -> MutateCell NewCellList : Cell operator number : Probability; where Cell is name of the actual cell, CellListb is a list of neighbouring cells (cells which influence the transition) MutateCell is a name of the cell, which will replace active (checked) cell, NewCellList is a name list of the cells, which will be created at the neighbourghood of the checked cell. Their position will be chosen randomly. Cell operator number is an extended condition for application of the transition function, where Cell is an arbitrary name of the cell, which is from the neighbourhood of the checked cell operator is one of following arithmetic operators: <, >, = number is an integer number from the interval [0,MaxState] Probability is an integer from the interval [0,100], and imagine probability of apply transition function in per cent. Example: A B C D -> A A A : A < 5 : 15 ; Means that at the neighbourhood of cell A - under the condition that the neighbours are cells named B,C and D and at the same time the state of the arbitrary cell A is less than 5 - two new cells A will be created, with the probability of 0.15; Next transition rule for defining the process of ageing cells is : Cell : +-number : Cell operator number : InitState ; where Cell is a name of the cell, +-number is an integer increment which will be added to the state of the cell after each iteration (new generation). Cell operator number is extended condition where Cell is a name of the checked cell, operator is one of the following arithmetic operators: <, >, = number is integer number from interval [0,MaxState+1] This extended condition is usefull for the checking of color cycling. InitState is an integer number from interval [0,MaxState]. This is an inicial state of the cell.

Example: A : +1 : A < 20 : 1 ; Means increasing state of the cell A by one, if its state is less than 20. At the begining the state is 1. 2.5 Setting the initial state of the cell array Initialization can be done in three ways: 1. Enumeration - list of cells with their X,Y coordinates and state numbers Cell ( X, Y ) = InitState ; Description see below. Example: A( 10, 24 ) = 10 ; B( 22, 10 ) = 1 ; 2. Process - in this case rewriting parallel graphs in form of L-systems (see [1]) Syntax: Cell ( X, Y ) = InitState -> EndCell = EndCellInitState : string ; where Cell is name of the cell, X, Y are coordinates, InitState is integer number from interval [0,MaxState], initial state of each cell. EndCell is the cell at the end of the line representing branch of the L-system. EndCellInitState is an integer number from the interval [0,MaxState] EndCell initial state of the cell at the end of the brach. Example: LEN = 5 ; ALFA = 60 ; A ( 50, 10 ) = 1 -> A = 1 : ff(+f)(-f)f(+ff(+f)(-f)f)(-ff(+f)(-f)f)ff(+f)(-f)f. means that the start (root) of the L-system has coordinates (50,10). Line consist from A cells. Each cell has an initial state equal to 1. Length of each brach is 5 units. 3. Initial state as a result of simulation. This method allows to get the initial state of the cellular array from the result of simulation of another cellular automata.

3. Implementation and experimental results Program is implemented in BORLAND C language. The process of simulation consists from three steps: 1. Computing a new generation of the cellular array 1.1 Application of rules for reproduction and mutation - scan array and try apply rule for each living cell ( with the state > 0) 1.2 Application of rules for ageing - scan array and try apply rule for ageing 2. Storing cell array - changes are saved on a disk 3. Display - display cellular arry of the new generation on the monitor Example 1.: Simple grammar for reproduction cells. Grammar: DIM N=64; X=100; Y=100; f=5; a=60. VAR A : 1 : (1,1,1)->(63,63,63). AGE A : +1 : A < 63. STARTUP A ( 50 50 ) = 1. BEGIN A -> A A : A < 63 : 50. END Sample images after the simulation (after 10,40,100 iterations) Pixel cells 1-3

Bar cells 1-4 Example 2. Grammar: DIM N=64; X=100; Y=100; f=5; a=60. VAR A : 1 : (33,33,33)->(10,10,10) ; B : 1 : (63,1,63)->(1,1,1) ; C : 1 : (63,1,63)->(1,1,1) ; D : 1 : (63,63,63)->(20,20,20). AGE A : +1 : A < 63 ; D : +1 : D < 63. STARTUP A ( 10 10 ) = 1 ;

D ( 10 90 ) = 1 ; D ( 40 30 ) = 1 -> A = 2 : f+f--f+f+f+f--f+f--f+f--f+f+f+f--f+f--f+f--f+f+f+f--f+f--f+f-- f+f+f+f--f+f--f+f--f+f+f+f--f+f--f+f--f+f+f+f--f+f. BEGIN A -> A A : A < 60 : 20 ; D -> D D : D < 60 : 10. END Sample images after the simulation (after 10,40,100 iterations) Variable sized bar cells 1-3 Variable sized ellipses 1-4

Example 3. DIM N=64; X=100; Y=100; f=5; a=60. VAR A : 1 : (1,1,1)->(43,43,43) ; D : 1 : (20,20,20)->(63,60,63) ; B : 1 : (1,1,1)->(1,1,1) ; C : 1 : (1,1,1)->(1,1,1). AGE A : +1 : A < 63 ; D : +1 : D < 63. STARTUP D ( 90 10 ) = 1 -> A = 1 : f(fff(+f)f)+ff(-f)+f ; D ( 90 90 ) = 1 -> A = 1 : ---f+f-f ; D ( 10 50 ) = 1 -> A = 1 : -f-f+f-f+f-f+fff(-f+ff-f+f-f+f-f-f)+ff+f-f+f-f ; D ( 20 90 ) = 1 -> A = 1 : +++f(+f-f)-f+ff(ff)+f ; D ( 10 10 ) = 1 -> A = 1 : f(+f-f)-ffff ; D ( 50 10 ) = 1 -> A = 1 : ff(+f)(-f)f(+ff(+f)(-f)f)(-ff(+f)(-f)f)ff(+f)(-f)f. BEGIN A -> A A : A < 60 : 20 ; D -> D D : D < 60 : 10. END Sample images after the simulation (after 10,40,100 iterations)

Variable sized ellipses 1-4 4. Conclusion and future plans This system allows the flexible way of defining behaviour rules and simulation of cellular automata. Results of the simulation are presented in the graphical form after each iteration step. The system allows different graphical cell states interpretations (by means of 2D shapes). Future work will concentrate on the implementation of cellular automata in threedimensional grid, and interpretation of 2D and 3D grid by means of three dimensional objects. One of the alternatives is using metaballs and metaellipses, which will allow to model biomorphical shapes. At the end I would like to thank associate professor Martin Sperka for some comments during the work on this project. 5. References [1] Fristacky,N.,a kol.: Logicke systemy, Alfa, Bratislava, 1986. [2] Zara,J.,a kol.: Pocitacova grafika - principy a algoritmy, Grada, Praha, 1992. [3] Rise v pocitaci, 100+1, jun 1998, pp.6-7.