Sunday, June 26, 2005


Coding my head off

It has been a really long time since I posted anything here. This weekend I have been participating in The Eighth Annual ICFP Programming Contest.

There were a few accidental clues given before the contest started. The LiveCD they distributed mentioned something about game servers, and the submission instructions mentioned a cop and a robber executable. Thinking that the contest might require some socket programming, I looked at the languages available to see which ones would be best for that. I always had Python and Java to fall back on, but Chicken Scheme seemed like a possibility.

When the contest was announced on friday, however, the cop and robber executables just had use stdin and stdout for all communication, which left the choice of language pretty wide open. I decided to go with OCaml. There are things about OCaml that really annoy me. I get syntax errors in odd places and I have to put parens in places I wouldn't expect. It is probably just because I don't know the language well enough. When the contest is over, I'd love to have someone who knows the language well to look over my code and tell me what stupid things I do.

Despite the minor annoyances, I am really happy that I picked OCaml. Toby Reyelts was arguing with me here about static vs. dynamic typing when I first started this blog. I think that OCaml's static type checking really saved me many times on this project. When I changed something significant, the compiler dutifully told me when I broke an interface.

There will be more about the contest in a future blog entry. I have been keeping a little log during the contest, just updating what I am working with, along with the time, so you get some idea what it might be like. I just don't want to say anything until the contest is over (in 2 weeks, after the requirements change) because I don't want to give away anything to my opponents.

I submitted a cop & robber a little while ago and I think they may end up being my final entries. It is almost 11pm EDT, so there are only 11 hours left in the contest and I'm really tired. Realistically, I don't think I have any shot at winning. I think that my bots have a good chance of making it out of the regular season round, but I expect them to be trounced in the playoffs.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?