With the arrival of Flash we've seen a great influx of machine crafted artificial-life let loose onto the networks. Algorithms previously only known to specialist researchers have fallen into the hands of Computational artists using Flash and Actionscript. From tiny bacterial simulations, spiders and worms through to flocking bird simulations, many areas of animal life have been simulated.In an earlier article 'Fractal Botany and the Art of Recursion' I explored some of the techniques for coding Plant Life in Flash using recursive functions. This then is a sister article (divided into parts) to that article and in this first part I will look at abstract mathematical schemas that can be used to represent life with simple algorithms and rule sets and then work up the food chain from the smallest creatures to larger ones.
CELLULAR AUTOMATA
Cellular automata, originally conceived by Stanislaw Ulam and John von Neumann in the 1940s, are arrays of cells that "evolve" step-by-step according to the state of neighbouring cells. Typically a Cellular Automaton consists of a regular grid of cells, each of which can be in one of a finite number of possible states, updated step by step according to a local identical interaction rule.
Though apparently simple, the visualized output of a CA program can produce infinite permutations of complex graphical patterns. As a result they have become of great interest to computational artisans using Actionscript as well as other visual programming languages. At times they look like psychedelic fungal space invaders mutating in gamespace, often they appear as finely woven fabrics. All though not rendered in Flash Mirek Wojtowicz has curated a huge collection of beautiful CA Species cultivated from different rules sets. Auscillate has produced some beautifully coloured Flash Automata with a source file available for code perusal.
CONWAY'S GAME OF LIFE
Probably the best know cellular automaton is John Conway's "Game of Life" which simulates the processes of life, death and population dynamics. A grid of living 'entities' (coloured squares) inhabit
The Game and their existence depends on the number of living or dead neighbours each entity has surrounding it. Each entity has eight neighbours and the state of all the entities are taken into account when redrawing the whole grid in discreet time steps. Typically the transitions depend on the following rule set:-
- A dead cell with exactly 3 live neighbours becomes alive (or is "born").
- A live cell with 2 or 3 live neighbours stays alive; otherwise it dies (from "loneliness" or overcrowding").
G3rm has a Flash rendition of Conway's game of life housed in an effective minimal and clean interface.
Kaiyijo takes a mycological isometric view of the game of life where you can determine the starting configuration of a mushroom population.
LANGTONS ANT
Langton's Ant is another popular 2-dimensional cellular automata, the ant is guided by another simple set of rules, the result culminates in a rather hyperactive ant with a penchant for psychogeography!
Exorcyze has written an optimised flash version of Langton's Ant with a source file also available for download.
A fascinating attribute of all CA's is the ability to create ordered patterns out of apparent randomness, after 10,000 generations the ant will start to build 'bridges' That is, it seems to get stuck in a loop of movement and direction for a specific period of time. Looking at this CA as a whole after its been running for sometime it appears as if there is some sentient element at play, sketching out some intelligible geometric form with 'purpose'.
BIOMORPHS
An equally interestingly named branch of A-life is that of the Biomorphs. In a different universe Biomorphs take on the Transformers in a competition of organic and mechanical shapeshifting. In our universe they are computational simulations of genetic mutation invented by Richard Dawkins to promote a philosophical debate to do with natural selection and the existence or non-existence of God. Eccesignum has a nice Flash Biomorph simulation, which evolves a race of red-winged moths over successive generations
BACTERIA
Moving on from abstract population algorithms id like to introduce the smallest member of the animal kingdom that seems to have a penchant for influencing Actionscripters into creating simulations of them, the Bacteria. Jared Tarbell has used his particle emitter component to produce a ‘multi-coloured array of self-similar particles resembling accelerated bacteria growth'.
Of course performance-wise there are much better environments for developing and running A-life simulations. But Flash allows the rapid prototyping of A-Life systems (at least in AS1) and furthermore its ability to combine coded with tweened animation, still I believe, puts it above the heavyweight OOP environments for artists with intermediate programming skills.
In Part 2 of this article I will move further up the food chain and look at simulations of animals in Actionscript that swim, walk and fly.