MATLAB Programming Contest Blog
November 17th, 2010
Sergey again
Our friend Sergey has another feather for his cap by claiming the 100 Node Challenge prize. His winning entry came in last night with minutes to spare. In fact, his entry would have claimed the 98 Node Challenge too, since his thrifty code didn’t even use all 100 nodes.
Because it’s so short, it’s easy enough to show you the complete winning entry. Well done Sergey!
function [thrustRow, thrustCol] = amit_brad(chart, aIndex, bIndex, maxThrottle)
[aby abx]=ind2sub(size(chart),[aIndex; bIndex]);
d = (diff([aby abx]).*[1.004 0.9996])';
R=norm(d,1);
R=max(R,48);
t = round(maxThrottle.*d/(30/R+R) * [1 1 -ones(1,4) zeros(1,3)]);
thrustRow = t(1,:);
thrustCol = t(2,:);
And now we are into the final minutes of the contest. Good luck everyone!
By
Ned Gulley
Ned is part of the MATLAB Central team.
15:32 UTC |
Posted in Sailing Home |
Permalink |
1 Comment »
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.
|
Frankly speaking, I just got lucky. Victoria created better entry. Unfortunately she made small mistake in her submission, and that let me to win. I hope it will not discourage her from future participation in the competition.