Interstellar Contest on Fuun Programming 2007 (Endo Lives)

go next top of page

Preliminary

On July 20–23, 2007 we participated at the ICFP Programming Contest. The contest task was to repair the genetic material of an alien called Endo. He has a special genetic structure consisting of the bases I,C,F, and P, which encodes a programming language based on regular expressions. The output of this process, the RNA, consisted of drawing primitives, that allowed the generation of an image displaying Endo's shape. The goal was to change Endo's genes by adding a prefix in front of it, that should modify the process to produce a different image where Endo lives happily in the shape of a cow.

My experience from the contest is given here. I later spent much more time to find a perfect prefix that would restore the target image completely. For this I developed a faster DNA converter in Java (see below), a disassembler, and heavily improved the perl script that writes the prefix. My best prefixes are collected here.

 top of page go back

Fuun DNA/RNA Interpreter in Java

After the contest I wrote a new DNA/RNA Interpreter in Java (we used an ocaml version during the contest). The goal was to get a competitive interpreter that also displays the processed RNA (the picture) on the fly. I chose Java as language because it is portable, makes it easy to output graphics and is pretty fast thanks to its JIT compilation technique.

You can download endomorphose, my Fuun DNA/RNA interpreter written in Java. It needs Java 5 (version 1.5) or higher. It is competitive, doing more than 200,000 iterations per second on a 3 GHz CPU. It can produce the source image in less than 10 seconds if GUI is turned off. The term ‘graphical user interface’ is a bit exaggerated. It just displays the picture and you cannot interact with it. Use my tool as follows: