I’m at ICFP right now, listening to Tim Sheard’s presentation on the ICFP 2008 Programming Contest as I write this blog entry. The information about the contest development was moderately interesting. As we knew, the server was written in ML; there were also two sample clients, one in 800 lines of ML (sharing about 500 lines of the server) and one in about 1400 lines of Haskell. Writing the clients was quite helpful to understand better the problem, and in fact they simplified the problem in several ways based on this experience.
There are some interesting language stats; it appears that Python, C++, Haskell, and Ruby are getting more popular (compared to 2003), and C, Perl and Scheme are getting less popular.
I was having a look through the blogs and code of some of the other competitors and found a few things of interest.
Greg Heartsfield’s entry was done in Haskell and in many ways seemed similar to ours. (Well, the code wasn’t formatted nearly as nicely. :-)) He didn’t use Parsec for the parser, and comparing the two parsers, I think ours (which did use Parsec) is a bit cleaner. But he did use the State monad for control, whereas we threaded the state through by hand. (I really should look at that State monad one day.) We both seem to be doing similar geometry stuff, though our typed, vector-based calculations seem nicer. I didn’t see him in the first final trial, though; I would have been curious to compare his results.
Some results have been made available. The first few trials of the lightning round were made available first, which just rubbed in the annoyance of forgetting to submit for that, but a few days later we also got the first seven trials of the final round, and we didn’t do that badly at all. (You can find us listed as “shitamachi no ue”.)
Apparently several contestants failed the first trial due to problems connecting to the server. One cause that there was some noise about was being able to connect when given an IP address, but not when given a hostname. That must have been rather frustrating.
We did manage to get a build going, and submitted our new version around 3:30. We then discussed martians, realized we didn’t have time to do anything with that before the contest closed at 4 a.m., and so went back to look at our crater-avoiding and speed algorithms. Unfortunately, on the spiral map we’re cratering two out of five times, due to excessive speed. We have some ideas for fixing it, but no time, so we just tweaked a couple of parameters, and did a final upload. That went in at Mon, 14 Jul 2008 11:59:40 -0700, with twenty seconds to spare!
Overall, this was a really good experience. We learned a lot, and a lot of fun, to boot. I’ll be doing a full writeup in the next week or so; I’ll post an announcement here when it’s ready.
Oh, right, our team name! It’s 「下町の⊥」. Now you can look in the listings and see how well or poorly we did.
Paul and Eric left before midnight, to catch their trains, and Bryan left a couple of hours ago, so it’s down to me and Chris. Now that we’ve got a good base to build on, I’ve been able to clean up and refactor the “desired driving state” code, and start to deal with the acceleration issues. We now look at our destination and figure out the maximum speed at which we can go and still turn fast enough to cross our destination point, and try to stay below that speed. Pretty cool, huh?
However, we decided we wanted to submit this, and realized that since Bryan has left with his laptop, we no longer have a Linux box on which we can build our submission! (We can’t do it on the live CD because it’s missing libraries.)
But wait! We appear to be having some luck installing the packages on Knoppix; with luck, we will be able to build there after all….
We’re happy to report we finally got a strategy that mostly works. We are able to dodged inanimate object just fine; next we have to fine tune our course behaviour, and if we have enough time avoid martians.
Oh, and we’re still thinking of implementing a global strategy, but people are starting to leave so that is looking doubtful.
gammbarimasu!
We started quite early today, well 11am anyway. We started to look at fixing our lameCraterAvoidance, and it wasn’t until Curt came in that it was decided that we would rewrite the strategy from scratch.
So we headed for lunch to discuss our possible strategies, and Paul came up with some geometry that would enable us to do strategies in a more general way.
We got started at 4pm and by 5:30 we had something that actually worked, but was missing the strategy bits.
And so that battle continues…
Curse!
Ok, this is annoying, and it’s all our fault. As it turns out, we had enough running last night before 4 a.m. that we could have made a lightening round submission, but I had just never thought about it.
Argh!