Friday, October 31, 2008

Juniors in the South African Computer Olympiad

A concern I have always had with the South African Computer Olympiad (SACO) is the lack of juniors (grades 10 and below) making it through to the third round and eventually the International Olympiad in Informatics (IOI). A glance at the SACO winner archive makes this quite evident. The only person that has won a medal in grade 9 or below (and hence stood a chance of making the IOI) was the well-known Bruce Merry.

Why do we have this problem? The obvious problem is that IT is only offered from grade 10 and it's nearly impossible for someone to pick up enough within those first few months in time to make the final round of the SACO. However, it is quite common to get those who taught themselves programming in the earlier grades yet only make the final round in there last one or two years. Vastly different situation to the Maths camp, where grade 8s and 9s are a common occurence.

Today we made a giant step in improving the situation. It goes back to little over a year ago during the final round of last year's SACO. We had three juniors (grades 8-10) joining us on-site for a junior competition in which they couldn't win anything. One of these kids did so well on the first day we invited him to write the senior paper the following day. Unfortunately as he only had a single day's worth of points to stand on, it was near impossible for him to win a medal and a place in the IOI training squad.

This gave us reason to invite a larger number to participate in the training. Due to a strictly worded rule, only the medallists could compete for a place in the IOI. Along with this and our limited budget we had to place several restrictions on those outside the top six, but we invited the next six best non-matrics to attend the training camps of which five accepted the offer. Things ran very well as the larger squad resulted in more discussion as well as pushed the top guys to perform better. Yet still, there was this lack of competition amongst those we called the squad++ as they had nothing to aim for but goals they set themselves.

For this year's final round the rule in questioned was worded more openly. The final round this year was the most competative from recent years and yet we still ended up with a new grade 9 and new grade 10 just missing the medal positions! It's been a long month, but today they were finally accepted into our first ever larger-than-usual squad. We now have ten highly competative kids in our squad, with the distribution being three grade 12, five grade 11, one grade 10 and one grade 9. All are elegbile to make the IOI team next year, and should Charl who's the one in grade 9 make the team he will be our youngest team member after Bruce! Now that they've shown us what they can do it's up to us to train them and make sure we continue to work on the great results.

I have some other plans to further increase the junior numbers. Now that we have these guys as role models it will be easier to catch the attention of other juniors and I don't plan on missing this opportunity. I already have the names of some current very capable grade 8s and 9s wanting to take a shot at the SACO next year. It's going to be a fun and interesting year to come!

Sunday, October 12, 2008

ACM ICPC South African 2008

Yesterday UCT hosted 22 teams from UCT, Stellenbosch and UWC for the ACM International Collegiate Programming Contest. This year we had three new helpers from this years World Finals team that can no longer compete. We did a lot of preparation on our side for the event, but as we had the SACO just two weeks ago we didn't contribute any problems.

The contestants started arriving from 07:30 for a large breakfast we prepared for them. They thoroughly enjoyed all the food and chowed it far quicker than we could've imagined! Thanks to Chris Parker and Bertus Labuschagne for preparing the breakfast and snacks during the contest.

While the contestants ate and I handled registrations, Ian Tunbridge was in charge of preparing the lab with the team flags and balloons. For the first time we decided to blow up all the balloons in advance. Given the number of problems solved last year this seemed like a good idea, but alas as you'll find out soon enough it was not.

At 08:30 we started moving the contestants down to the lab, let them login and waited for the practice contest to start. After the practice contest the Nigerian server went offline due to power cuts, which pushed the start 45 minutes late. The start wasn't as pretty as we had hoped for, but things finally got underway at around 09:45. It took some time for the first problem to be solved, so I had plenty time to catch a before shot:

We put together a large team of UCT students no longer eligible to compete. We had Timothy, Migael, Tamara, Harry, James, Robert, myself and for a brief period Ian. Our first goal was to check the problems and send in any clarification requests early, our second goal was to beat Bruce who was doing them solo. Unfortunately we failed at our second goal, but then again Bruce cheated. :P We got A, B and D within little over an hour. We then got stuck for quite some time trying to match what was actually expected in F but got it eventually. Harry was working on C, but very quickly hit a dead-end as he was getting wrong answer. We asked numerous clarification requests and submitted countless times before finally getting it correct. We tried too hard on E, realising too late that a brute force solution would work in time (Bruce beat us to it and solved all six!).

This was our team near the beginning, minus me who took the photo:

More than an hour into the competition, ʇlnɐɟƃ3s got the first problem at the UCT site:

Things never really took off for the full five hours. The number of problems solved was very low with only 14 of about 70 teams solving anything at all, only two of them solving more than two problems. Going into the last hour Tuks3 were leading on time and the scoreboard stopped updating. This is when the local teams started pulling away, with team ʇlnɐɟƃ3s solving a third, followed shortly by Code Red from Stellenbosch also solving a third. At this point both teams were extremely close on time, but UCT's ʇlnɐɟƃ3s was just ahead.

It was in the last 15 minutes that ʇlnɐɟƃ3s closed the door on everyone else by solving their fourth and final problem. No-one was able to pass them in the final minutes. The end results were:

  1. ʇlnɐɟƃ3s of UCT (Keegan Carruthers-Smith, Max Rabkin, Saadiq Moolla)
  2. Code Red of Stellenbosch (Ralf Kistner, Dirk-B Coetzee, Petrus Theron)
  3. Tuks3 of Pretoria
  4. Team LOL of UCT (Julian Kenwood, Richard Baxter, Mike Talbot)
  5. OMG Raptors of UKZN
With only 15 problems solved at the UCT site (23 overall) we had 117 inflated balloons left over. What to do with 117 balloons? Well we let the contestants take them home, and this was the result :)

After the contest we went to Primi Piatti in Cavendish for lunch. Unfortunately before we could go we needed to clean up the mess the contestants left behind. Yes messy bunch...Once the lab was all cleared up we headed off and were just about the last to arrive.

After lunch, which was staggered by table for some reason (the kitchen couldn't handle the numbers or something) we had a little awards ceremony.

3rd at UCT site and 4th overall: Team LOL (Richard, Mike, Julian)

2nd overall: Code Red (Dirk-B, Petrus, Ralf)

1st overall: ʇlnɐɟƃ3s (Saadiq, Keegan, Max)

Contest helpers: Marco, Harry, Timothy, Tamara, Migael
Missing: Chris, Bertus, Ian

Problems, detailed standings, statistics and more are available here.

Thursday, October 9, 2008

Renewed Masters

It's been two months now since I heard the news that would result in drastic changes in my life. I never realised just how bad the news was that day. It took some time to sink in. When it did, however, that was the start of a very stressful period for me. I'm talking about the day my supervisor resigned.

There's a lot of details behind what happened, but for personal and ethical reasons I have chosen not to comment about it much online. It is for the same reason I have held off posting about what has been happening until now. Now that things are settling down it's time to start coming out with the news though. Many of my friends have known about this for a while now, it's just time I announce it publically.

So my supervisor resigned. Within a couple days I started talking around and within a week I was discussing the possibility of a new project. Ironically the first person I spoke to, Michelle Kuttel, is now my new supervisor. The main reason for the change of topic is that no-one else at UCT was strongly grounded in the field of my existing project. While it meant essentially writing off six months of hard work, I had to consider my long-term goals. It sucks, it really really sucks...but I don't regret making the decision, not yet. It's been a long, stressful ordeal, but I feel I've made a good decision.

My new project is in bioinformatics and is on protein-protein interface prediction. It's a graphics-heavy project with the new field of computational biology to learn. It's a drastic change from my previous project, but I have reasons for doing so. The plan is to get down to serious work quickly and get wrap up end of September 2009. It's a very quick masters, but after the huge setback I'm seriously determined to get this done and with my supervisor believing it's possible I will get it done.

Apologies for keeping this so brief, but I don't want to say too much publically about this. You'll be hearing more about my new topic though, no reason to keep that quiet! I plan on putting together my proposal by the beginning on next month and giving my proposal presentation a week or so after.

Thursday, October 2, 2008

South African Computer Olympiad 3rd Round 2008

The final round of the South African Computer Olympiad took place this past weekend. This was the first year it's been run since Bruce and Carl left UCT at the end of last year. While we sorely missed them and noticed how much we had previously taken for granted, we managed really well.

There were 16 contestants, 7 of which had gone through squad training over the past year so we had a nice split between newcomers and oldies. Two months ago I setup a Google Group for them to ask questions and discuss the 3rd round. Given the large number of oldies this turned into an exceptionally useful discussion forum with the oldies asking advanced questions which in turn gave the newcomers a target to aim for. They could see what was out there and it really boosted their urge to learn. Over the past two months there have been nearly 400 messages posted!

The contestants all arrived on Friday evening, when we had an introduction session and went through the rules and environment. This was followed by the classical pizza-on-campus supper. After having helped most of them through the forum I was anxious to meet the new guys, but the swarm of unrecognisable faces threw me off guard, especially as we were running around frantically sorting out a couple last minute things. Fortunately I was able to get to know most of them over the weekend.

On Saturday morning we started them off with a practice session so they could become familiar with the environment. One advantage of having the forum was that we also for the first time got them all to use the handing system before arriving, even going as far as providing a time-constrained practice contest for them. This meant that most of the time was spent getting familiar with the setup of the PC's, which wasn't much to get used to and so they got bored very quickly (bored for these guys means they were coding up quite advanced algorithms we have never taught them). The only issue we had was with Dev-CPP setting folders to read-only and saying it couldn't save, which we eventually fixed.

While they went off for lunch, we setup the lab for the start of the first round of competition. A first for this year again is that we logged them in and pre-loaded all the IDE's and such (the network is so slow we have scripts that copy everything onto the local disk), which took more time than we had anticipated so most of us got cold food. We're supposed to have an admin account that can wipe their accounts clean, but the network admins messed that up and it's one of few things we forgot to test beforehand. This meant we had to wipe the accounts manually.

The first round of competition started well. We had given them two easier problems and a challenging graph theory problem. Our goal was to get them a good starting score and letting them have sufficient time to have a real crack at the nastiest problem of the weekend. The plan worked well, besides us underestimating the difficult of the second problem. The scores were very high, with the average for this single day higher than the average over both days last year. While the problems were slightly easier this year, the major reason for the difference was the much stronger contestants. We were seeing the results of a larger training squad over the past year combined with the amazingly fruitful forum.

There was one single issue we've had haunting us for about six months now, but which has affected us very little prior to this weekend. One of our grading servers keeps on crashing, and we only recently discovered that a CPU error is resulting in a kernel panic. Alongside this the hard drives our only other grading server were stolen (long story!) and with everything else we were working on we never got around to finding new drives and reinstalling in time (we got close though!). With the introduction of detailed feedback and grouped test data increasing the load on the grading server it starting crashing a lot more frequently, to the point where we had to be careful and coax it along, rebooting it a number of times. Being South Africans we quickly improvised, using a red packet of sweets to indicate the server was down and a green packet when it was up.

Once the first round of competition was over we started a problem discussion lead by the problem authors. We describe the expected solutions, which is a great learning experience for the contestants. While that was going on we started the evaluation of the day's submissions. Unfortunately the grading server really started freaking out under the load we were putting it under. Combined with many more test cases than we previously used due to grouped test data, the evaluation took over two hours! When we finally got the marks to the contestants they were mostly all very happy with the higher-than-usual marks.

We then went out for supper to the Spur where I had a very chatty group at my table. It's always wonderful have conversations with them about their experiences in school and in the competition. It's the best way to discover what areas need improving and potential solutions to them. It's amazing hearing stories of how students at schools without Computer Studies quite randomly happen to come across the SACO, and also quite sad to think of all those who miss out.

Sunday morning was an early one for us as we had to prepare for a 09:00 start. While the problems were busy printing Keegan and I moved the grading server closer to the aircon in the hope that it would reduce the frequency of crashes. We then went down to the lab to log everyone on, clean the accounts and do some other stuff to make the contestants' lives easier. We started a few minutes late again, but it went very well from there on. We had very few crashes of the grading server, helped in part by further decreasing the load we put on it. So it was a much more peaceful day for us coaches (this just half of us):

The problems for the second round of competition were considerably harder and we noticed the effect from early on. The easiest problem was very easy to get a wrong answer on as it looked like greedy was correct. Fortunately most of them quickly moved onto the other two problems, one a competitive data problem and the other a quite challenging greedy problem with a 70% Dynamic Programming solution. The race for first place was extremely tight up until the last half hour when the eventual winner zoomed ahead. It's always fascinating watching the rush of submissions coming in at the end, which can sometimes shuffle things up quite significantly.

Evaluation of the second day was much, much faster due to several reasons. This meant that we had the results ready and printed immediately after lunch. The contestants were very anxious to see their results and as much as we try keep them from discussing them within a few minutes nearly everyone knew who had come where. The medal winners were:

1. Francois Conradie winning R36,000
2. Robert Ketteringham winning R24,000
3. Kosie van der Merwe winning R24,000
4. Haroon Moolla winning R2,000 (used Java)
5. Schalk-Willem Kruger winning R12,000
6. Michiel Baird winning R12,000

The final Python prize of R10,000 went to Gwylim Ashley. The results were extremely strong this year and the competition very tight. Just looking at how this years IOI contestants Robert and Schalk-Willem were beaten by others shows how hard everyone worked for this competition. The results were also nicely separated with no positions at the top very tight, and the scores at the lower end weren't dismally low as they have often been in the past (another sign of how strong the competition was!)

Some random statistics about the medallists: Kosie is the only one not wearing glasses. Four are Afrikaans-speaking (reading Afrikaans code isn't fun, fortunately only Francois does this!). Half are in grade 11 and can return next year, including Francois. Robert and Schalk-Willem participated in the IOI this year, and Haroon was invited but withdrew. Besides Michiel, all made the final round last year.

Rondebosch Boys' High School has had a strong performance in the SACO over the past years. Being the first Bosch boy to make the final round and leading the Scientific Committee, this makes me extremely proud. This year the boys didn't disappoint, grabbing 2nd and 4th places as well as one non-medallist position. Here's me with the Bosch contestants (Haroon, Robert, me, Roland):

The Western Cape as a whole has also produced the largest number of final round participants in recent years. This year we trumped big time though, with 10 of the 16 contestants. Of the rest, three were from Gauteng, one from the North West and one from Namibia. Why not share that fabulous Western Cape photo then? One of the Cape contestants is missing from this photo.

And while I'm at it I might as well give the lonely out-of-towners some love and care :)

Left to right: Divan, Heinrich, Graham, Bennie, Sheldon, Michiel, Kosie, Haroon, Gwylim, Francois, James, Roland, Charl, Schalk-Willem, Robert

After the photo session they had an opportunity to check on their results and raise any appeals. Fortunately we had none, which is always a great sign and a relief. Once that was over we could rest in peace knowing that the five weeks of hard work we put into the problems yielded no problems besides two minor clarification requests.

Very quickly the attention switched to Open Arena, yes they start earlier every year! Some day we need to start a new game, this is getting boring Ben. Graham also tried working on a visualisation tool for the data problem, but when I saw him trying I quickly told him us coaches already had one and I showed it to them. After there hour of fun we had pizza and watched some Fawlty Towers and Thin Blue Line.

Monday was their last day. It was supposed to begin with a tour of the Center for High Performance Computing, but due to the political situation in the country and the resignation of the Minister of Science this was cancelled at the last minute. We couldn't find anything to replace it in time so they had a late morning and arrived on campus at 12:30 when I took them for some campus food. It was another opportunity to have some good discussion time with them.

At 14:00 they had an hour with Michelle Kuttel, student advisor at UCT. She went through the Computer Science streams and courses at UCT as well as touching on a few other areas. I then took them over to the Robotics Lab where one of the engineers gave them a tour of the lab. The tour of UCT ended with a visit to the Virtual Reality Room where they were shown some demo's of current and past masters/phd projects.

At the end of it all it started raining and they needed a lift down to the bed and breakfast. Fortunately two of the other coaches were available to help with lifts, but the rain proved an interesting challenge: how to get 13 people down to the B&B using three cars parked in different parking lots while getting the least wet. After getting them all down there to prepare for the awards ceremony, we had to get them all to Kelvin Grove. Fortunately we were just able to squeeze in a single trip there as opposed to the planned double trip.

It was the first time I had been to Kelvin Grove and I was very pleased with it. I was also very happy to see my old headmaster from school attend the awards ceremony for the first time. This was the first time I can even remember talking to him. He was most impressed with the continuous success of Rondebosch at the SACO. Prof John Webb was also a surprise to see, he heads the Mathematics Olympiad. I also got the opportunity to meet Bennie and Michiel's parents, two of the top newcomers. There were many other people I met, but to list them would be silly as I'd miss out on so many.

The awards ceremony was very formal as usual, with guest speakers from Standard Bank and Microsoft. Fortunately they weren't all that boring, but one or two did drag on a bit long. When we finally got around to the announcement of the results it all flew by so quickly. It was great hearing such positive feedback from the contestants and their parents. Before I knew it, it was over and people had started leaving. I even missed out on the now mandatory official Rondebosch photo.

And that's the end of the beginning. Yes, now we just need to select the training squad (medallists are already guaranteed a place in the squad, but we're hoping we can invite more). We then put them through a rigorous training process which we use to select four of them for the International Olympiad in Informatics to be held in Bulgaria in August 2009. I look forward to the year ahead of working with this great bunch!

Huge thanks to the other members of the Scientific Committee who helped make this one of the smoothest SACO 3rd rounds I think we've ever run. Max helped out a lot with the general admin as well as setting a problem. Keegan took on a lot of the technical work, as well as taking over Harry's problem. Ben organised the junior contest, with some help mostly from Timothy, Julian and Richard. Richard was great at proof-reading the problems and being very nit-picky about them. Migael took on the mission of setting the data problem and helped out a lot over the weekend. Harry in setting his lovely problem, but forcing me to rewrite the problem text. Mark, the new addition to the group helped me set the easy problem. Nicholas, Bruce and Carl also helped out a lot with checking the problems and all of them are far away so they all helped out online only. Tamara was also the first beta tester we've had, a new idea picked up from the IOI. Michelle and Peter helped with some last minute proof-reading. I hope I never missed out on anyone. :)