Archive for the ‘Programming Tricks’ Category

Genetic Programming: Evolution of Mona Lisa-of-mona-lisa

Silicon valley is full of potential web 2.0 start ups. My previos work colleague suggested me Internet Radio called Pandora based on Music Genote Project. Digging in more about Genome programming, I encountered interesting program which creates picture replica of Mona Lisa on .Net platform.

Algorithm is described as follows:

0) Setup a random DNA string  (application start)

1) Copy the current DNA sequence and mutate it slightly

2) Use the new DNA to render polygons onto a canvas

3) Compare the canvas to the source image

4) If the new painting looks more like the source image than the previous painting did, then overwrite the current DNA with the new DNA

5) repeat from 1

It is depicted below:

You can download the source code from here: http://code.google.com/p/alsing/downloads/list

How did yu like it?

Follow

Get every new post delivered to your Inbox.