Finish 2010-11-17 12:00:00 UTC

Artful sailor

by Victoria

Status: Passed
Results: 402407 (cyc: 1, node: 87)
CPU Time: 0.061
Score: 80481.5
Submitted at: 2010-11-16 20:37:08 UTC
Scored at: 2010-11-16 20:37:37 UTC

Current Rank: 2682nd (Highest: 2123rd )
Basis for: look around (diff)
Basis for: Endeavour (diff)

Comments
Victoria
16 Nov 2010
One more version
Please login or create a profile.
Code
function [thrustRow, thrustCol] = solver100(chart, aIndex, bIndex, maxThrottle)

[aby abx]=ind2sub(size(chart),[aIndex; bIndex]);
d = diff([aby abx])';
R=sum(abs(d));
t = round(maxThrottle*d/(0.4+R) * [1 1 -1 -1 -1 -1 0 0 0 0]);
thrustRow = t(1,:);
thrustCol = t(2,:);