| Register
Sunday, July 20, 2008   

A-Life: Automata, Ants, Biomorphs and Bacteria

Created By  Paul Prudence, at  9/27/2004 - 7 comments.

Click to view this author's website.

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.

Need Professional Help For Your ActionScript Project?
ActionScript.com Consulting Services provide top quality professional ActionScript consulting to businesses around the globe. If you have a professional project in need to world-class talent, tell us about your project by requesting a quote today.

Reader Comments

  1. ralf  Replied:
    ( 9/28/2004 At 12:23 AM)

    You should take a look at grant skinner's life form experiments on his blog:
    fireflies: http://www.gskinner.com/blog/archives/000083.html
    ecosystem: http://www.gskinner.com/blog/archives/000081.html
    crystallization: http://www.gskinner.com/blog/archives/000094.html

  2. max ziebell  Replied:
    ( 9/28/2004 At 12:34 PM)

    Great article... It's funny because I just recently used Conway's Life Simulation on the background of flashpage.
    I ported a javascript implementation using a 1 dimensional array that gets mapped with y*width+x.
    regards
    Max Ziebell

  3. David Emberton  Replied:
    ( 9/29/2004 At 10:14 AM)

    I think it'd be cool to see more on this as it relates to the emerging "video site" genre. I know it's not exactly the same, but A-Life stuff can be applied in that too, especially for creating characters that interact with the user. And since it's Flash, it fits perfectly for the broadband market.

  4. Paul Prudence  Replied:
    ( 9/30/2004 At 2:14 PM)

    I think emergent behaviour arising from CA's are becoming increasingly important in game design too to give unpredictable life-like qualities to game entities.

  5. ben blundell  Replied:
    ( 2/18/2005 At 4:30 PM)

    Interested in emergent behaviour? Download AntWorld Artificial Life research tool at http://home.freeuk.com/ben.blundell

  6. Creford  Replied:
    ( 2/25/2005 At 2:12 PM)

    Excellent article, sir. Helpful communication, thanks a lot!

  7. John Winkelman  Replied:
    ( 5/21/2005 At 8:59 AM)

    Hi all! Thanks for visiting my site (eccesignum.org). I wanted to let you know that the URL for the biomorphs experiment has changed; the new address is :
    http://archive.eccesignum.org/index.phtml?../blog/20040613

Login to post your comments. If you do not have an account with us please Register.
Copyright 2005 by ActionScript, Inc.   |  Privacy Statement  |  Terms Of Use  |  ActionScript Client Extranet