Report of the 17th Prolog Programming Contest

In the Prolog Programming Contest we lock up teams of Prolog programmers in a room for a short time with 5 challenges. Each team has 3 members and one laptop. The team that solves most challenges in the least amount of time is the winner.

An image of the participants to the Prolog programming competition

Prolog Programming competition

Participants eagerly presented themselves: 8 teams of 3 people showed up.

We had

  • 2 Leuven teams,
  • 1 Low Countries team,
  • 3 country teams: one each from Italy, Denmark and Germany,
  • 2 mixed teams
    • an Austrian-Portugese-US team with Neng-Fa Zhou, and
    • a Danish-English-Italian team with Marco Gavanelli.

Last years winners were represented by Peter Van Weert in a Leuven team.

It is at least as much fun running the contest as it is participating. Many teams have learned from last year’s techniques. Swapping around the keyboard like mad and reading the problem description pages on both sides simultaneously were definitely popular again.

You learn a lot of things running the contest. Practicing in advance is very effective, but it’s not too late to learn Prolog during the contest. Knowing your team mates intimately is no guarantee for success, nor is having won last year.

I am grateful to quite a few people who have made the Prolog Programming Contest possible. Firstly, thanks to Bart Demoen for founding the contest series and running it for so many years; also thanks for supplying one particularly nasty problem description. Secondly, I would like to thank the FLoC organizers and ICLP chairs, Manuel Hermenegildo and Torsten Schaub, for providing us with an excellent venue with many power sockets and making the contest an integral part of the programme. Finally, thanks to Gerda Janssens for helping me run the contest very smoothly.

Now, on to the ranking. This year’s contest was much more challenging than last year’s. Three out of eight teams have not submitted any correct solution; one of these did not submit anyting. The time pressure was immense: solve 5 problems in 90 minutes rather than the usual 120. But Prolog is great at rapid prototyping, right? Unfazed by this time pressure, most teams ignored the 4 easy problems and went straight for the hardest… without success. The most successful teams were those that remembered in time to also look at the other problems.

Having 2 solutions was enough to make the top 3 this year. The team that came in third, is the team of Jon Sneyers, Peter Van Weert and Dean Voets.

Then, there are two teams left, just 2 minutes apart, also with 2 correct solutions. These are the teams of Neng-Fa Zhou and Jan Wielemaker. Clearly being a Prolog system implementer gives you an edge in the contest. Congratulation to this year’s winners: Jan Wielemaker, Paolo Pilozzi and Peter Biener. The winners’ Prolog system of choice is SWI-Prolog.
I hope you enjoyed it.
Tom

The problem descriptions are available here.

1 comment for “Report of the 17th Prolog Programming Contest

  1. Neng-Fa Zhou
    October 1, 2010 at 2:57 pm

    It’s unfair to call our team “team of Neng-Fa Zhou” since I joined the team the previous evening that had had Salvador and Ulrich. Our team wasted too much time on the meglev problem. We thought that it’s just another shortest path problem.

    Here is another solution I just wrote. Is this correct?

    :- table maglev(+,+,+,min).
    maglev(L,S,F,Cost) :-
    member(station(S,F,_),L),!,Cost=0.
    maglev(L,S,F,Cost) :-
    (member(station(S,N,Rs),L),
    maglev(L,N,F,Cost)
    ;
    append(L1,[station(S,N,Rs)],L2,L),
    append(Rs1,[R],Rs2,Rs),
    append(Rs1,[N],Rs2,NRs), % R becomes the preferred next station
    append(L1,[station(S,R,NRs)],L2,NL),
    maglev(NL,N,F,Cost1),
    Cost is Cost1+1).

    It works at least on the sample case:-)

    ?- maglev([station(a,b,[c,d]), station(b,z,[a,c,d])],a,z,Cost).
    Cost = 0.

Comments are closed.