cellular automata - algorithmic composition max/msp patch using 1-dimentional binary cellular automata CA

   CELLULAR AUTOMATA: HOW IT WORKS

This sub-page is a quick background on CA, and how CA simulations work.

BACKGROUND: The idea behind CA was introduced by John von Neumann (1903-1957) in the 1940's, underpinning his work on self-replicating machinery. The introduction of the discrete cell lattice in which the CA is calculated was conceived by Stanislaw Ulam (1909-1984) (from his work on crystal growth).

For a more in-depth background, see chapters 1 & 2 of my dissertation on Cellular Automata in Music, and the
CA patches Powerpoint file for details on using CA in Max/MSP.

CELLULAR AUTOMATA DOC
CA DISSERTATION (Ch.1&2)
     NAVIGATION     

1-1-1_HOME        LOCI_HOME        MAX_HOME       ADDER-PAD
HUM/COMP
SYNTHESIS
NEW-PROJECTS
  DOWNLOADS

—«o: 1D CA NEIGHBOURHOODS :o»—

1D CA NEIGHBOURHOODS

—«o: 1D CA TRANSITION-RULES :o»—

1D CA TRANSITION RULES

—«o: CA LOOPED-FINITE SPACE :o»—

INFINITE SPACE: Faking infinite space using a toroidal formation

—«o: ABOUT CELLULAR AUTOMATA :o»—

  NEIGHBOURING CELLS CA

1D CA simulations are calculated in time-steps, one-by-one, on a parallel basis; so in order for a computer to do this, it must store the results of its calculations in another place until it has worked out the outcome for all cells in the simulation. At this point all cells are updated.

When working out the value of a cell for the following time-step, the CA simulator looks at the current values (or 'states') of the cells on either side of the cell in question. A visual representation of this 'neighbourhood' is shown in the 1st illustration to the right.

The first neighbourhood in the illustration, expressed as r = 1, (meaning a cell-radius of one), shows the two cells; one on either side of the cell being calculated, being considered in the calculation (more on the calculation in a moment).

The second neighbourhood in the illustration, expressed as r = 2, (meaning a cell-radius of two), shows the four cells; two on either side of the cell being calculated, being considered in the calculation. (the square marked 'T+1' represents the value of our cell in the next time-step - as in 'time+1').

—«o: TRANSITION RULES :o»—

  CALCULATING SUBSIQUENT CELLS

CA: RULE-110 from single live cell

In calculating subsiquent cell states, taking into account the stipulated neighbourhood size, there are a set of transition rules that define a resulting state for the cell in question, given any possible cell arrangement in the neighbourhood.

In the TRANSITION-RULES diagram (far-right), all combinations of an r = 1 neighbourhood have a resulting cell state (dead-cells are white, live cells are black). So, using RULE 110, a dead cell, surrounded by two live cells, will become live in the next step.

1-dimentional CA (as discussed here) are usually depicted on a two dimentional 'screen', showing the passing of time as horizontal rows, usually flowing down the screen. The inset CA diagram shows a simulation of transition-rule 110, starting with a single live cell in the top-left corner. Due to the nature of rule-110, the automaton lows outward to the right, creating a right-angle triangle. Also notable in the behaviour of this rule, is the 'nested' tringles of varying sizes, pointing upward and to the right. This nested behaviour is a signature of 1D cellular automata, and is present in the output of many transition-rules.

  FINITE & INFINTE SPACE

Neuman and Ulam's original CA theory uses an infinite cellular lattice in which the automata are calculated. This is not practical for actual computer simulations, so a looped-finite space technique is employed so as not to create a a the sides of the automaton.

The illustration in the right-hand column called CA LOOPED-FINITE SPACE shows visually how the rolling up of a 2D lattice can let cells traverse freely from one end of the simulation to the other. The first section of the illustration shows a cylindrical space, as is used for 1D CA, and the second is rolled again to form a toroidal space, allowing both the X & Y axes of a 2D automaton to be looped.

  THE 1D r = 1 BINARY RULES

As mentionned before, an r = 1 neighbourhood (3 cells in neighbourhood) has 8 transition rules, covering the 8 possible cell configurations surrounding each cell. So, the fact that an 8-bit number can represent a set of transition rules for a 1D CA, the rules are commonly known by these values (hense rule-110 above).

When you have worked with CA for little while, you begin to recognise the atterns, and what to expect from each rule. Some will produce nothing but (what seems like!) random noise, others will quickly settle into an unchanging state; though some will produce some beautiful, sensical patterns that have a balance between order and chaoss.

  THE RULE CLASSES

A set of four classes were defined (by ) to quantify the types of CA output:

A further, informal class was added by to describe those special rules that walk the tightrope between order & choass; called the GNARLY class. From this classification came the phrase 'Seek Ye The Gnarl!' from Rudy Rucker.

  OTHER OBSERVATIONS

While trying out various 1D CA, you will undoubtadly notice that some rules are identical to others (at least under certains cell-configurations, such as a single live cell), or that some rules are the exact opposite - that is, that they are an exact inverse of another rule.

When using CA for musical composition or sound synthesis, you often want different attributes than you would in a visual sense. What may look beautiful to the eye, may be too complex when presented as audio. For algorithmic compositional purposes, I found that differentseeding of rules that would quickly fall into a cyclic repetition where often the most effective. They offered a repetition; a hook for the listener, which could be changed, re-introduced, or updated by presenting the simulation with a new preset cell configuration (a seed).

—«o: DOWNLOADS :o»—

  DOWNLOADABLE FILES

CA DISSERTATION
Chapters I & II
(right-click save target)
CELLULAR AUTOMATA DOC (Powerpoint File)
(click to view)

The Powerpoint document refers to my Max/MSP Cellular Automata patches, and was written for my Human/Computer Collaboration module.



Back to top of page

—«o: EXAMPLES OF (some of my favourite)1D CA (from single, central live cells) :o»—

SIX EXAMPLE CELLULAR AUTOMATA SIMULATIONS