MATLAB Programming Contest Blog
November 9th, 2011
Alex P. and the Anatomy of a Tweak
Congratulations to Alex P., winner of the Square One Challenge with his SOC tweak. Michael Bindschadler came close… so close! to winning. But from the newsgroup, we read this heartbreaking story.
Curses!! I tried to hold my SOC code for as long as I could, but I was going to be away from the computer for the last hour before the deadline and I knew I hadn’t really kept up with the leader developments since I forked from “m” to develop my SOC solver, so there were a lot of tweaks that could probably quickly improve my code. I went so far as to make sure I could do the submission at the last minute from my phone. I submitted from my phone at 8 min before the deadline because I wanted to have time to log back in to matlabcentral, find my entry, and resubmit with the SOC tag, in case my phone had mysteriously logged out or I was in a dead zone or something. I was hoping 8 min was not going to be enough time for someone to find and insert a winning tweak. I should have known better :)
Congrats to Alex P, who only needed 7 min to find something to improve and resubmit it, winning by improving the time by 0.16 seconds!
His closing comment shows that Michael is a good sport and that he understands the brutal reality of the contest: tweaks can happen at any time. Alex P., who has narrowly missed on prizes of his own, deserves our recognition too. But I can’t resist showing you the one line out of 1675 lines where the code differs. On line 478, where Michael had
Alex had substituted
And that, my friends, is all it takes. Assuming your answer is actually better, which is harder than it looks.
There is one exception to the Iron Law of Tweaking, though, and it will soon be upon us. Once we get so close to the end of the contest that your code can’t be scored until after the deadline has passed, nobody can see and modify your code before the end. All the hardcore competitors (and who else is left by now?) are aware of this. They’ve reached deep into the shot locker for their last tricks. Now they are slowly circling the submit button, waiting… waiting for the moment to blaze away. I’m picturing the ships of the line at Trafalgar drifting slowly toward each other, almost within range. The slow match is burning. All is silent.