MATLAB Programming Contest Blog

May 13th, 2007

Big Sunday Push Continues

The Big Sunday Push continues until midnight tonight (EDT). We award this prize to the contestant who makes the biggest cumulative improvement to the top score on Sunday. See Sunday in the “Contributions in Daylight” section of the Statistics for standings. Please enter your name exactly the same for all your entries so we can group them together.

We’d like to thank everyone for following the no-hacking rules we’re using for this contest. It’s made it much easier for us to administer this contest and the queue has been chugging along without a hitch!

Has the addition of cyclomatic complexity to the score changed the way you’ve written your entries? Is it helping to keep the code more legible? Or is it still too early to tell. Please let us know what you think.

3 Responses to “Big Sunday Push Continues”

  1. Alan Chalker replied on :

    I don’t think the complexity factor has significantly helped the competition due to the fact you set the bar too high. I’ve calculated out the scoring equation coefficients which are:
    k1 = 0.1
    k2 = 2
    k3 = 0.05
    k4 = 1
    (Kudos for changing them significantly from past competitions). Based upon this, each point of complexity above 10 only affects the score by 1 point. While most of the leading entries are hovering around complexity 10, I’ve seen competitive entries as high as 20 something and as low as 6 or 7. People don’t seem to be worrying too much about complexity and are just tweaking the parameters and timing now.

    I’d suggest in the future you lower the complexity ‘freebie’ bar to 4 or 5 and make the penalty factor significantly greater (i.e. k4=10 perhaps?? or make it exponential).

    Perhaps a new midterm contest would be the best scoring code with a complexity of 3 or less??? That would seem to really push us based upon the entries so far and would be in line with what the 1000 character challenge calls for (which is typically a ~3x reduction in code length).

  2. Alan Chalker replied on :

    I forgot to include my analysis of the current tradeoff between time and results. Right now the leading entry has a results of 39582 and time of 48.7. We are way past the ‘knee’ of the exponential curve, which is somewhere in the 25-30 seconds range depending on how you look at it.

    Each 1/2 in time that is shaved off the code right now is equal to about 6 points of results.

    While we don’t know what the makeup of the test suite is, the best result obtained so far is 39028 by David Jones (who is as usual making significant and numerous contributions to the contest). I think we can assume that the minimum possible result is somewhere around 39000.

  3. Yi Cao replied on :

    The minimum result has been pushed to 38681. I think it still has some space to go if we can make the code faster.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


The MATLAB Programming Contest is a semi-annual competition where contestants submit MATLAB code to try to solve a challenge. For more information, see the overview.
  • gopal: This is a try
  • Amtu: Well done Alfonso ! Congratulations ! Thanks MATLAB team, I’m already looking forward to the next time.
  • Alan Chalker: Just wanted to post here as well that I think Alfonso should be declared the grand winner since the top...
  • Alan Chalker: Just noticed something curious on the statistics page. While some of the charts are updating correctly,...
  • Ned: To Oliver: There will not be a late stage twilight in this contest. So it’s full daylight right to the end.
  • Oliver Woodford: Much obliged, Mike. For anyone looking for a speed boost to that approach I recommend “Basic...
  • MikeR: I agree with Oliver that if possible making the final few hours of the contest conceal the entries will be...
  • Oliver Woodford: When does late stage twilight begin, and will it then run on until the end of the contest?
  • Alan Chalker: As I traditionally do about this time in the contest, I’ve submitted a heavily commented version...
  • the cyclist: Looks like there might be a problem with the statistics page. For one thing, Alan Chalker holds all 20...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.