Saturday Leap and Sunday Push 14

Posted by Ned Gulley,

As has become our custom, we will be running two mini-contests this weekend. The Saturday Leap prize goes to the person who makes the single biggest percent improvement for any entry with a submit time on Saturday, 16 April. Keep in mind that our times are registered against Universal Time; the time stamp on your submission is the thing that matters. The Sunday Push prize goes to the person who makes the biggest cumulative improvement for any number of submissions received on Sunday, 17 April.

Watch the statistics page for information showing who’s doing the best as the weekend progresses.

We will also be awarding a prize to the author of the best MATLAB Programming Contest Haiku. Whereas most of the contest is a purely objective competition that rewards steely logic and intellectual firepower, the Haiku Challenge judging will be completely subjective and arbitrary. It’s just a fun exercise for your neglected right brain. The prize is certain to be cheap. Submit your entries in the blog comments.

Have a great weekend!

14 CommentsOldest to Newest

So it was late last night and I misread the penultimate word in this entry as ‘code’ not ‘blog’ and posted a couple in the code comments. Here they are again:
-

The Matlab Contest:
Delightful and instructive
Thanks to The MathWorks!

-

Matlab Contest Pro
On top of the leaderboard
Nick Howe greets Daylight

-

The Prince of Darkness
Alfonso wins with two tries
Amazes us all

-

Coding and tweaking
Two different playing styles
Both have a function

As is tradition
I have calculated the
scoring formula

The score sums four parts
with special coefficients
changed for each contest

Part 1 is result
times k1 which is set to
.0025

Part 2 has k2:
divide 5 by 9000
to get it’s value

Multiply that by
an exponential: runtime
times k3′s value

k3 is equal
to 1 divided by 9
(seeing a pattern?)

For Part 3, k4
(with a value of 1) times
another factor

Which is either the
complexity minus ten
or zero (the min)

Finally Part 4:
Divide 1 by 900
(k5) times the nodes

My wife Susannah has a haiku to share:

Oh no! Contest time.
I have lost my spouse again.
His mistress: MATLAB.

Just read this out loud.
“Ditto for me”, said my wife
“Can’t wait for Wednesday”

“A Haiku Solver”
Entry 62029
by Alan Chalker

function board = ...
solver(words, weights, n, penalty)
count=ones(1);

line=ones(1);
len=cellfun('length',words);
done=0;

[vals,ord]=sort ...
(len); board=zeros(n);
col=ones(n);

while done==0
w=words{ord(count)};
word=length(w);

loc=col(line);
if word-1+loc ...
<= n

board(line,loc:loc+ ...
word-1) = w;
col(line)=loc;

col(line)=col ...
(line)+word+ones(1); else
done=1; end;

line=line+...
1; count=count+1;
if line>n

line=ones(1);
col=max(max(col))*...
ones(n,1); end; end;

I like the entries from the wives! Brilliant. Hmmm…

we should do contest
for puzzled spouses who watch
vent your frustration

This haiku thing is dangerous. We could do haiku rules.

can’t resist tweaking
under many assumed names
I’m disqualified

Winners of the haiku challenge will be announced on Monday.

obsessive coding
endlessly optimizing
this way lies madness

Wednesday: Helen says
“Man your keyboards, Contest time!”
Darkness blinds us all

Thursday: re-read rules,
angst as errors revealed
Twilight lets us peek

Friday: weekend’s here
Best coder crowned by Ned
Daylight brings tweakers

Saturday is Leap
Hope nothing breaks on the site
while team is at home

Sunday queue backs up
Push rewards patient players
Spouses complain more

Monday: back to work
Can I sneak in some time for
the 1000 node challenge?

Tuesday: will their be
one last sub-contest for us?
Submissions slow down.

Wednesday: noon deadline,
endgame strategy appears.
Queue closes. Good Luck!

Wish I could edit
penultimate paragraph -
replace “their” with “there”

P.S. – note to Helen
5,7,5 not 5,7,7
Haiku syllables

contest is hard
contest is fun
Darkness or daylight
Noone give up

Tweaking and cheating
Winners emerge!

And I am
an imaginary winner.
I congrats the real ones!

Darkness — theory? hope!
Twilight — struggle to compete
Daylight — tweak tweak tweak

With my old Matlab,
Test suite refuses to run.
Sorry for spamming

Don’t know how to code
Just packaging people’s work
I’m a manager.

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