About Anything

The personal blog of Al Stevens. Focus is overrated.

Evolutionary Art

without comments

Image from series 081222

Image from Series 08-12-22

I’m not an artist, but I like art. At least some art. I’m reasonably conversant with computers, mostly software. Recently, I’ve been reading a bit about evolutionary biology, mostly popular writers like Richard Dawkins with occasional forays into Scientific American.  When I feel that I want a real challenge, I’ll pick up a copy of Science – which mostly shows me how little I actually know.

When I came across Dawkins’ computer generated images in the Blind Watchmaker, I found them intriguing — computer generated drawings based on evolution.  A recent visit to the new Sol LeWitt exhibit at Mass MoCA provided additional inspiration. His statement, “The idea becomes the machine that makes the art” decouples the work from the idea and instructions used to express it. The process of evolution has no ideas behind it but it does produce some remarkable life forms. Dawkins’ drawings demonstrate that a simple program based on the principles of evolution can produce interesting drawings.

So, I’ve begun experimenting. This post documents my very first “Evolutionary Art” program.

Leaping into this without doing any serious research is not the best practice. I’ve since embarked on reviewing what’s been done — there is a considerable amount of activity — more on that below.

My First Program

I wanted to do something simple, as analogous as possible to biological processes, and extensible. I also wanted it to produce images.

The Foundation

The program is written in PHP and uses the built-in GD library. It runs as a web application served by Apache. For this first series, I’ve restricted the shapes used to rectangles and ellipses and eliminated colors.

The Data

The basic building blocks are “genes” which are made up of sequences of “codons“. I’m sure that I’m doing violence to the strict biological meanings of these terms, but using them helps preserve the mapping between the biological information system and my electronic one. Codons represent both numerical and categorical values.

Two types of genes exist, component genes and control genes. They are structurally identical, but the codons may get used differently during the expression process.

Chromosomes are sequences of component and control genes. Component genes are expressed using a control gene to select — and here is where the analogy get’s weakest — a drawing routine, construct the necessary parameters and run it, sometimes multiple times. All of the parameters, the changes they undergo and the number of iterations are determined by applying the control genes to the component genes.

I call a set of chromosomes a “chromosome tree“, but should probably tune this terminology — I chose it because the chromosomes of different lengths when displayed as character data looked a bit bushy.

Evolutionary Processes

At this point, I’ve implemented two processes: mutate and mate. Mutate can be applied to a chromosome tree. It randomly changes a randomly chosen set of codons. Mate can be applied to two chromosome trees. It creates a new tree matching the two mates codon-by-codon and randomly selecting one of the codons from each pair. Both mutate and mate are applied to all genes in the tree, including component and control genes.

The First Series

The first series starts with three component genes and 3 control genes, always the same. From these I create 5 chromosomes, each 4 genes long. I combine these into a chromosome tree, mutate it and mate the two. I then mate the offspring with one of its parents. Since I’ve set the mutation probability pretty high — it’s 10% for each codon — the expressed images are different each time.

To see it, go to evolve.alstevens.org

Natural Selection

There is no selection process operating in this series. For now, each refresh runs the process and produces a new image. Once refreshed, the prior one is gone.

Serious Evolutionary Art

I’ve just begun to do the research I should have done before jumping in and writing a program. I’ve ordered The Art of Artificial Evolution: A Handbook on Evolutionary Art and Music, edited by Juan Romero and Penousal Machado. I’ve found Karl Simms Galápagos, which looks like it would have been fun to see when it was live. There’s a relevant review article, Aspects of Evolutionary Design by Computers by Peter Bentley. The blog dataisnature has a number of recent relevant links. There’s a set of related links posted by Craig Reynolds at Evolutionary Computation and its application to art and design.

Any other pointers would be gratefully appreciated.

Written by Al Stevens

December 30th, 2008 at 12:24 pm