The PLOP team is composed of four members :
Our programming language of choice is Objective Caml.
Our UM is written in about
four hundred lines of the C programming language.
It is the main problem that caused our lack of time since we passed
about eight hours to debug some weird programming errors...
It is not especially fast nor slow : 2 min 50 to run
the sandmark
benchmark on a Linux - AMD Athlon XP 3200+.
We wrote a second version (with no checks) which takes 1 min 30 on the same
machine, however it has to run on a 32bit system. It is 80 lines long.
The other languages used were Objective Caml, Perl, and Bash.
We resolved all the puzzles manually, the raytracer is the 2D version of our
experiments in Caml, it doesn't work on some tests, but since the tests
seem to be generated from the submitted program and the current version
(version means the actual ascii art, not the program) passes them,
it's ok :-p.
However, when a version failed on a test, the Caml program found the good
result with the given data, so it seems to be just a transcription problem,
and since there are only three colors, it seems that there's no real need
for a search for the fixed point...
We wrote a little printer in Caml in order to have a more readable
concrete syntax...
We didn't write any program to optimise the PHYSICS use, so they were
all written by hand and some programs are far from perfection since
we used repetitions of patterns found for some standard behaviours...
We didn't have enough time to complete this task, we didn't
manage to program fillmem and multmem.
| stop, stop1, stop127, stop128 |
|---|
| (10/10, 10/10, 20/20, 15/15) |
| These were a good start to show how to stop a program. They were all solved with the first solution |
7F00 |
| swapmem |
| (36/40) |
407F267F3300 |
| swapreg |
| (50/50) |
| We found two solutions for this one |
7F64716100 |
| and then |
7F617F00 |
| swapreg2 |
| (50/50) |
7F61616200 |
| addmem |
| (40/40) |
627C2300 |
| addmem2 |
| (46/50) |
627C237F615500 |
| clearreg |
| (97/100) |
7F7F247E7D7C7B6100 |
| copyreg |
| (138/200) |
| Here we filled the spec with a funny solution: since the wanted output was to have the value somewhere in the memory, we filled the mem with values [|1;2;...;254;255;0|]. |
6162627C61617F7F61617F7F61612B03 01610161617F7F61617F7F6161616102 10017F7F61612B610461610001021201 61617F7D61617F7F61617F7F6111 |
| copymem |
| (161/200) |
617F7F6161686261012E61617F61617F 616161617F6112617F61617F61617F7F 7F7F7F7F7F116400 |
We solved the first puzzle on paper and the next, up to 300, manually with the help of an ever evolving perl script. The solutions becoming too long, we transformed the script to a solver. The algorithm it implements is the folowing:
All the puzzles were solved by hand since they were not too hard after we defined the two main patterns which are: a group of two ants which walks at an average speed of 0.5x the speed of one ant, and another pattern which follows a diagonal.
We resolved all the puzzles manually, with the aid of vim to generate the commands easily. We didn't try writing a parser because we advanced fast enough and we hadn't discovered the "switch goggles" tip that would simplify the eventual parser.
In order to circumvent the censory engine we encoded the censored message in the condition of an item. Every character of the string is transformed to a kindlist of a length equal to the value of the character. The kindlists are chained in a condition encoding the string. A decoding function inverts the process and returns the original message which this is not censored.
Our solution is in two files, with the commands that we wrotte manually. The only interesting part is the modified robot mind source, also provided seperately.
We implemented addition and multiplication according to the corresponding classic recursive primitive functions. To minimize the length of the code we factorized it using a specialized if-then-else construction inspired by that in Lambda-calculus.