Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

acme (189)

acme
  (email not shown publicly)
http://www.astray.com/

Leon Brocard (aka acme) is an orange-loving Perl eurohacker with many varied contributions to the Perl community, including the GraphViz module on the CPAN. YAPC::Europe was all his fault. He is still looking for a Perl Monger group he can start which begins with the letter 'D'.

Journal of acme (189)

Tuesday June 28, 2005
11:20 AM

ICFP

[ #25409 ]
ICFP is the International Conference on Functional Programming. No, I'm not talking about pugs (although they do have a category called "Functional pearls"...) but instead about the ICFPC. Every year they have a programming contest. You don't need to use a functional language to enter the competition, but it normally helps. I've entered before. What happens if that they produce a specification to a problem, and you have a limited amount of time to code up a solution (last Friday 3pm to yesterday 3pm). This year they're throwing in a new round where they'll change the problem and we'll have 24 hours to adapt our programs to it. Why enter? Because the judges will proclaim "Perl is the programming tool of choice for discriminating hackers" if we win. But anyway, I entered this year, using Perl of course.

This year's problem seems simple. You are given a map of a city and have to code a "robber bot" which steals money from the banks and a "cop bot" which coordinates with other cops to catch the robber. But of course, it gets more complicated than that - read the spec in detail and you find that the big problem is full of little problems like speaking the protocol, path finding, maximising scores, making plans for the other cops , trust models for cop bots, voting on plans, and so on and so on. It's a good problem.

We had a small team - just me and Greg McCarroll, mostly due to Glastonbury and YAPC::NA clashes. We parsed and talked the protocol fairly quickly, had static and random robbers and cops shortly after that and then started with the algorithms. The cycle went something along like this: modify the cop so that it catches the robber, then modify the robber so that it escapes the cops, then repeat. We managed a submission a few hours before the deadline, and one a few minutes before it too ;-).

I regret the small size of the team. It's really handy having extra people there to bounce ideas off, and so that they can take care about an aspect of the problem. For example, we only added visualisation late on Sunday and that helped a lot for tweaking parameters. I have some animated GIFs to show off:

  • An animated infomation cloud. You can see the map here (with intersections and streets). The red dot is the robber, the blue dots are the cops, the yellow intersections are the banks, and the green cloud is where the cops reckon the robber is (gathered from evidence, smelling, and bank robbing notifications).
  • A much prettier visualisation of a game. This was produced after the deadline, when I had time to make prettier map-drawing algorithms (looks like Google Maps) and get some nice icons. Turns out that the ICFPC organisers are interested in using my application to visualise the tournament games...

Is "Team Orange" going to win? Probably not, but it was fun to enter!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.