ICFP programming contest
28 July 2007Last weekend I competed with a team of VUW students in the ICFP programming contest. This is an annual, international contest lasting 72 hours. It is run by a different university each year, so the format tends to vary from year to year. There are no restrictions on team size, programming languages or computing resources.
Our team (called ‘interfacers’, for want of a better name) consisted in the end (after several people did not end up participating for various reasons, and one person who happened to be in the lab joined us) of Andrew Childs (hereafter referred to as lorne), Timothy Goddard, Clinton Scott, Samuel Hegarty, Michael Welsh (yomcat) and me.
This year, it ran from 10:00 pm on Friday 20th July until 10:00 pm on Monday 23th July. The story behind this year’s task was that an alien (of the Funn species) named Endo had been dumped on Earth by an Interstellar Garbage Collector and then hit by a cargo container. Endo was unconscious, and could not survive on Earth in his then-current form. Therefore our help was urgently needed to provide the necessary modifications to his DNA to adapt him to Earth’s environment. Our proposed modifications were to be evaluated by his spaceship Arrow and the proposal most likely to ensure Endo’s survival would be performed by Arrow.
We were given a copy of Endo’s DNA (a 7.2 MiB string of the letters I, C, F and P), and a specification of how Funn DNA works. The DNA works by repeatedly modifying itself through a long series of matching and replacing according to certain rules (which we were given) until it is all consumed, and in the process producing RNA. We were also provided with a specification of how to transform the RNA into a 600×600 px image. We were given a source image (which is produced by running Endo’s DNA as provided), and a target image (which we were to attempt to reproduce by constructing a prefix to be prepended to Endo’s DNA):

(more…)