Jul 10 2008
14:25 jctoast@hotmail.com
Jul 11 2008
05:31 jjjj
Jul 16 2008
14:50 Click to yabber
Jul 18 2008
20:17 Click to jabber
Jul 23 2008
14:02 how do you freaking get to the open door on 64
Jul 27 2008
23:53 awesome
Aug 5 2008
01:53 YABBERTIEM
Aug 10 2008
11:10 i wanna put this on my myspace, any clues
Aug 14 2008
22:33 <Jabber>
Aug 18 2008
07:21 Click to yabber
07:21 malllll
07:21 שלום שלום
23:10 <Jabber>
Aug 19 2008
06:18 helooo
Aug 20 2008
02:57 click to yabber
Aug 28 2008
09:40 any clues on level 68?

steike / tech / genetic art

Kyrre Glette and I wrote a simple image generator using genetic programming for an artificial intelligence course. Here are some of the images it made.

The names are also random.

benedictor
avager
gol
amal
sheel
mement
enide
fruisit
cation
deplorencher
archfork
conds
lipse
habi
tavnit
messions
nicky
emorian
slimsy
crystalgic
courn
centranscription
conded
polytica

How it works

An image is generated by a mathematical expression that calculates a value for each pixel given its (x,y) coordinates. For instance, the simple formula x*y looks like this:

The coordinates range from -1 to 1. The bottom right corner, for instance, has coordinates (1,1), and thus gets the color 1*1 = 1, or white. Here's a typical expression:

The expression trees for the images at the top range from 40 to 1000 operations. These all need to be evaluated from scratch for each individual pixel.

To make the system fast enough for us to play with it in near real time, the expressions were compiled to x87 machine code on the fly. The compiled code would evalute about 130M graph nodes (operations) per second.

The functions were all generated by randomly mutating graph nodes using a few simple mutations: Individual nodes in the expression tree would be replaced by similar nodes (often) or by new subtrees (more rarely). Also, two images could be cross-bred, merging the 'genes' of two good-looking images to generate offspring, hopefully combining the valuable parts of each parent image.

By adding looping constructs to the 'expression language', we were able to make the system invent fractal shapes.

Since the images are built from mathematical expressions and not pixels, they can be generated at any resolution. Rendering 50-megapixel images suitable for print is a matter of toggling a switch on the command line (and going for a cup of coffee).

Animation

There are many numerical constants in the expressions. The overall structure and feel of an image comes from its structure, but the actual incarnation is determined by those constants. The image is only a single point in the 100-or-so-dimensional space of possible parameters. I hacked together a small script that would plot an ellipse through the many-dimensional space intersecting the point defining the original image. Here are some animations:

crystalgic
messions
archfork
amal

An interesting thing to do with this would be to generate the parameters in real time based on some external data source (from, say, running music through a frequency analyzer).

[Comment on this]