Friday, July 26, 2013

The value of rules

Rules are an essential part of any competition. Rules level the field and try to make sure that whoever wins is the best player or the best team; the fastest, the strongest or the best problem solver, depending on your particular sport. Of course, this is only true if everyone plays by the rules. Unfortunately, even a fair team may win by playing with the rules, rather then simply paying by the rules.

The default rules of Mooshak, the programming contest management system I developed, are those of ICPC - the International Collegiate Programming Contests. The basic rule is quite simple. Wins the team that solves more problems. When several teams have an equal number of solved problems the winning team is the one with a lower cumulative time in all accepted problems. 


Since the ranking depends also on time, most teams would just submit their first untested version, hoping that it were correct. We all know this is a bad programming practice and would be an extra burden for contest management systems too. This is why in the ICPC rules a wrong answer has a penalty of 20 minutes.  Knowing this, teams think very carefully before submitting a potentially wrong answer.


Some years ago in an ICPC programming contest there was a team in second place. They needed another problem to win, but by submitting a wrong answer they risked a penalty. If neither them nor the team in third place had another accepted problem in those last few minutes they would be second. But they would not win the contest unless they had  another problem accepted.  

They finally decided to submit and it was a wrong answer. They continued to submit and they lost the second, and then they lost the third place too. Surprisingly, or maybe not, during the final ceremony they were more applauded than the team in the first place. I guess that most people in the audience realized that there are values more important then rules, and the courage to take risks is one of them. And a few people also realized that rules must follow values, and this is why today, in the ICPC rules, a penalty for a wrong answer is only effective when the problem gets an accepted answer. In the end, you cannot lose by trying to do better. 

Have this in mind every time you compete. CodeVita will have its own set of rules, not those of ICPC, to define who wins, but if you do your best you can be sure you will also be a winner.

No comments:

Post a Comment