Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Fall 2012 MATLAB Contest: October 31 - November 7

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Lindsay Coutinho

Date: 8 Oct, 2012 18:49:21

Message: 1 of 39

The Fall 2012 MATLAB Contest will start at Noon EST (16:00 UTC) on Wednesday, October 31 and will run through Noon EST Wednesday, November 7.

Please post any comments or questions about this contest as replies to this thread so that we can track the conversations.

To learn more about the MATLAB Central Contest, you can visit this page: http://www.mathworks.com/matlabcentral/contest/

We look forward to seeing you online!
 
Lindsay Coutinho and the MATLAB Contest Team

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Lindsay Coutinho

Date: 31 Oct, 2012 16:07:08

Message: 2 of 39

The Knots Contest has started! Our Fall contest will run from 16:00 UTC Wednesday, 31 October through to 16:00 UTC Wednesday, 7 November. Everyone is welcome to join the fun.

Learn about this contest by reading Ned's Knots Rules, http://www.mathworks.com/matlabcentral/contest/contests/38/rules. Download sample code from File Exchange, http://www.mathworks.com/matlabcentral/fileexchange/38649, and then submit your own entry, http://www.mathworks.com/matlabcentral/contest/contests/38/submissions/new.

If you have any questions or comments, please post here.

See you online,
Lindsay Coutinho and the Contest Team

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Michael C.

Date: 31 Oct, 2012 18:29:09

Message: 3 of 39

I think the scoring portion of the sample code has a problem. If I substitute this simple puzzle in (which is just a triangle and should already have no knots and not require any moves)
    a = [0 1 1; 1 0 1; 1 1 0];
    xyIn = [1 1; 0 1; 0 -1];
    wts = [1, 1, 1];
I get that it contains two knots. I think this line in "numKnots" function, "for j = i:nLines", should be "for j = i+1:nLines" since otherwise it is comparing the line to itself and saying that they overlap.


"Lindsay Coutinho" <lindsay.coutinho@mathworks.com> wrote in message <k6ribc$5k7$1@newscl01ah.mathworks.com>...
> The Knots Contest has started! Our Fall contest will run from 16:00 UTC Wednesday, 31 October through to 16:00 UTC Wednesday, 7 November. Everyone is welcome to join the fun.
>
> Learn about this contest by reading Ned's Knots Rules, http://www.mathworks.com/matlabcentral/contest/contests/38/rules. Download sample code from File Exchange, http://www.mathworks.com/matlabcentral/fileexchange/38649, and then submit your own entry, http://www.mathworks.com/matlabcentral/contest/contests/38/submissions/new.
>
> If you have any questions or comments, please post here.
>
> See you online,
> Lindsay Coutinho and the Contest Team

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Nicholas Howe

Date: 31 Oct, 2012 20:08:08

Message: 4 of 39

This looks like a fabulous contest topic -- so many different possible approaches! I'm really sorry to hear that this will be the last contest.

I agree with Michael C. that the code provided seems to calculate the number of knots incorrectly.

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Helen Chen

Date: 31 Oct, 2012 23:45:08

Message: 5 of 39

"Nicholas Howe" wrote in message <k6s0f8$2o0$1@newscl01ah.mathworks.com>...
> This looks like a fabulous contest topic -- so many different possible approaches! I'm really sorry to hear that this will be the last contest.
>
> I agree with Michael C. that the code provided seems to calculate the number of knots incorrectly.

I just uploaded a new file. Please download and see if this helps. My apologies for the hiccup!

Best,
Helen

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Richard Zapor

Date: 1 Nov, 2012 01:52:08

Message: 6 of 39

The new grade function appears to undercount knots.

The latest download using function "grade" returns Zero knots for the rules example when two is expected.

The original runcontest.m post needed Michael's tweak on line 152.
 From: for j = i:nLines
 To: for j = i+1:nLines

Thank You,
raz

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Darren Rowland

Date: 1 Nov, 2012 03:09:09

Message: 7 of 39

"Helen Chen" <helen.chen@mathworks.com> wrote in message
> I just uploaded a new file. Please download and see if this helps. My apologies for the hiccup!
>

The new file has
for j = i+i:nLines

instead of
for j = i+1:nLines

Darren

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: jigar

Date: 1 Nov, 2012 05:34:09

Message: 8 of 39

"Darren Rowland" wrote in message <k6sp4l$pc8$1@newscl01ah.mathworks.com>...
> "Helen Chen" <helen.chen@mathworks.com> wrote in message
> > I just uploaded a new file. Please download and see if this helps. My apologies for the hiccup!
> >
>
> The new file has
> for j = i+i:nLines
>
> instead of
> for j = i+1:nLines
>
> Darren

Hey, Can you tell me how is the weight vector calculated or is it already given hinting the user that he has to avoid as far as possible to move the node with high weigtt?

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Vipresh Gangwal

Date: 1 Nov, 2012 13:29:08

Message: 9 of 39

"jigar " <jigargada23@yahoo.com> wrote in message <k6t1kh$mno$1@newscl01ah.mathworks.com>...
> "Darren Rowland" wrote in message <k6sp4l$pc8$1@newscl01ah.mathworks.com>...
> > "Helen Chen" <helen.chen@mathworks.com> wrote in message
> > > I just uploaded a new file. Please download and see if this helps. My apologies for the hiccup!
> > >
> >
> > The new file has
> > for j = i+i:nLines
> >
> > instead of
> > for j = i+1:nLines
> >
> > Darren
>
> Hey, Can you tell me how is the weight vector calculated or is it already given hinting the user that he has to avoid as far as possible to move the node with high weigtt?

Hey, the weights vector is calculated randomly and provided as the third argument to the solver. The syntax for solver as mentioned in the rules is :
          xyOut = solver(a, xyIn, wts)
The solver function should use this weight vector and minimize the score modification term by avoiding to move nodes with higher weights.

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Vipresh Gangwal

Date: 1 Nov, 2012 14:15:09

Message: 10 of 39

"grade.m" updated.

Hi all,
Thank you for pointing out the issue with the grade function.
We have now updated the grade.m file with necessary changes. Please download the latest file from the file exchange and see if this helps.

We are sorry for the glitches and wish you all the best!

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Andreas Bonelli

Date: 1 Nov, 2012 15:09:08

Message: 11 of 39

Thanks for fixing that, but as you requeued all entries it's now impossible to know whether new entries pass or not...

"Vipresh Gangwal" wrote in message <k6u05d$7qg$1@newscl01ah.mathworks.com>...
> "grade.m" updated.
>
> Hi all,
> Thank you for pointing out the issue with the grade function.
> We have now updated the grade.m file with necessary changes. Please download the latest file from the file exchange and see if this helps.
>
> We are sorry for the glitches and wish you all the best!

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Nicholas Howe

Date: 1 Nov, 2012 16:10:08

Message: 12 of 39

Welcome to Twilight, everyone. Actually, it's still pretty dark in here because the queue is slow to clear. I'm wondering if this is because it uses the same grading software as the code provided for download, which is very slow to compute intersections. Perhaps this is intentional?

My personal preference would be to have the grading software on the test machine run faster, so that the length of the queue is determined by the speed of our submissions and not by the speed of the grader. I can offer my own more efficient version of the grading software if that would be useful.

Anyway, off to code some more. Enjoying the contest!

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Vipresh Gangwal

Date: 1 Nov, 2012 19:05:08

Message: 13 of 39

Hey Nicholas,

I agree, the long queue is adding a suspense to the contest. Please note that all the entries have been re-queued due to the upgrade in the grader function.
Soon the grader with catch up with the entries and the wait time will be lesser.

Till then,
Please enjoy the darkness and keep submitting your entries.

Have fun fighting to get the bragging rights by winning the last official MATLAB Programming Contest in this format.



"Nicholas Howe" wrote in message <k6u6t0$5do$1@newscl01ah.mathworks.com>...
> Welcome to Twilight, everyone. Actually, it's still pretty dark in here because the queue is slow to clear. I'm wondering if this is because it uses the same grading software as the code provided for download, which is very slow to compute intersections. Perhaps this is intentional?
>
> My personal preference would be to have the grading software on the test machine run faster, so that the length of the queue is determined by the speed of our submissions and not by the speed of the grader. I can offer my own more efficient version of the grading software if that would be useful.
>
> Anyway, off to code some more. Enjoying the contest!

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Craig

Date: 2 Nov, 2012 16:06:08

Message: 14 of 39

Do we get 3 minutes per puzzle or 3 minutes to solve all puzzles?

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Lindsay Coutinho

Date: 2 Nov, 2012 20:26:08

Message: 15 of 39

Hi Craig,
It's 3 minutes to solve all the puzzles. Hope this helps!

Best,
Lindsay
MATLAB Central Administrator

"Craig " <craig.robert.brown@gmail.com> wrote in message <k70r1g$4fc$1@newscl01ah.mathworks.com>...
> Do we get 3 minutes per puzzle or 3 minutes to solve all puzzles?

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Fernando

Date: 3 Nov, 2012 21:07:11

Message: 16 of 39

"Lindsay Coutinho" <lindsay.coutinho@mathworks.com> wrote in message <k71a90$4r4$1@newscl01ah.mathworks.com>...
> Hi Craig,
> It's 3 minutes to solve all the puzzles. Hope this helps!
>
> Best,
> Lindsay
> MATLAB Central Administrator
>
> "Craig " <craig.robert.brown@gmail.com> wrote in message <k70r1g$4fc$1@newscl01ah.mathworks.com>...
> > Do we get 3 minutes per puzzle or 3 minutes to solve all puzzles?

Are the top submissions using principal component analysis? Does anybody know?

thanks

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Richard Zapor

Date: 4 Nov, 2012 16:23:12

Message: 17 of 39

The time change appears to have crashed the statistics automatic update.

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Nicholas Howe

Date: 5 Nov, 2012 02:14:14

Message: 18 of 39

"Fernando " <quivira.f@husky.neu.edu> wrote in message <k7411v$dqt$1@newscl01ah.mathworks.com>...
> Are the top submissions using principal component analysis? Does anybody know?

They all use eigenvectors of the Laplacian matrix of the graph (which can be computed from the adjacency matrix.).

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Hannes Naudé

Date: 5 Nov, 2012 07:35:10

Message: 19 of 39

"Nicholas Howe" wrote in message <k777dm$9f3$1@newscl01ah.mathworks.com>...
> "Fernando " <quivira.f@husky.neu.edu> wrote in message <k7411v$dqt$1@newscl01ah.mathworks.com>...
> > Are the top submissions using principal component analysis? Does anybody know?
>
> They all use eigenvectors of the Laplacian matrix of the graph (which can be computed from the adjacency matrix.).

A good reference for this technique is https://akpublic.research.att.com/areas/visualization/papers_videos/pdf/DBLP-journals-camwa-Koren05.pdf (which I accidentally included as a comment on my first darkness entry before realising that comments are publicly visible, even during darkness and twilight).

I'm curious to hear what else people implemented. Did anyone try a force based layout (modelling edges as springs and nodes as charged particles)? It looks like it should perform well, but it will probably be slower than the current approach for a similar result.

I'm also amazed that the current leader still does not solve the planar cases in the contest suite perfectly (Cases 1,2,3,13,25 and 41 are planar graphs). The chrobak-payne algorithm can generate these results quickly and is available in the MatlabBGL toolbox from the file-exchange.
To test:

load testsuite_sample
for i=[1 2 3 13 25 41]
X = chrobak_payne_straight_line_drawing(sparse(suite(i).a));
gplot(suite(i).a,X)
pause
end

Unfortunately it uses mex files, so to use it in the contest, one would have to code it yourself.

It can also be used to find the maximal planar subgraph for the non-planar cases and then add back the non-planar edges. This should also be a very competitive approach and is very popular in the academic literature. I think there's a lot of points still on the table.

Wish I had more time to spend on these ideas myself.

Cheers
Hannes

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Andrzej Miekina

Date: 5 Nov, 2012 14:32:15

Message: 20 of 39

"Helen Chen" <helen.chen@mathworks.com> wrote in message <k6sd64$guk$1@newscl01ah.mathworks.com>...
> "Nicholas Howe" wrote in message <k6s0f8$2o0$1@newscl01ah.mathworks.com>...
> > This looks like a fabulous contest topic -- so many different possible approaches! I'm really sorry to hear that this will be the last contest.
> >
> > I agree with Michael C. that the code provided seems to calculate the number of knots incorrectly.
>
> I just uploaded a new file. Please download and see if this helps. My apologies for the hiccup!
>
> Best,
> Helen
Hi,
I think there is still something wrong with number of knots.
One of the rule is "A node sitting directly on a line counts as two knots."
For simple set of 4 points:
xy=[-1,0;1,0;0,1;0,0] and
a=[0 1 0 0
     1 0 0 0
     0 0 0 1
     0 0 1 0];
number of knots should be 2, but numKnots returns 1
and for xy=[-2,0;2,0;-1,0;1,0]; and the same matrix a (one line in other) it should be 4 knots, but numKnots returns 1
PozdrawiAM -
Andrzej

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Doug Hull

Date: 5 Nov, 2012 14:58:13

Message: 21 of 39

"Richard Zapor" <razapor@raytheon.com> wrote in message <k764pf$j47$1@newscl01ah.mathworks.com>...
> The time change appears to have crashed the statistics automatic update.

We have restarted this, and it is working. I think you will like the results!

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Craig

Date: 5 Nov, 2012 15:26:18

Message: 22 of 39

I tried a crude genetic algorithm. I'm not really familiar with graph theory so I just treated it as a multimodal optimisation problem. Needless to say my method was far too grinding to be able to compete!

"Hannes Naudé" wrote in message <k77q7e$877$1@newscl01ah.mathworks.com>...
> "Nicholas Howe" wrote in message <k777dm$9f3$1@newscl01ah.mathworks.com>...
> > "Fernando " <quivira.f@husky.neu.edu> wrote in message <k7411v$dqt$1@newscl01ah.mathworks.com>...
> > > Are the top submissions using principal component analysis? Does anybody know?
> >
> > They all use eigenvectors of the Laplacian matrix of the graph (which can be computed from the adjacency matrix.).
>
> A good reference for this technique is https://akpublic.research.att.com/areas/visualization/papers_videos/pdf/DBLP-journals-camwa-Koren05.pdf (which I accidentally included as a comment on my first darkness entry before realising that comments are publicly visible, even during darkness and twilight).
>
> I'm curious to hear what else people implemented. Did anyone try a force based layout (modelling edges as springs and nodes as charged particles)? It looks like it should perform well, but it will probably be slower than the current approach for a similar result.
>
> I'm also amazed that the current leader still does not solve the planar cases in the contest suite perfectly (Cases 1,2,3,13,25 and 41 are planar graphs). The chrobak-payne algorithm can generate these results quickly and is available in the MatlabBGL toolbox from the file-exchange.
> To test:
>
> load testsuite_sample
> for i=[1 2 3 13 25 41]
> X = chrobak_payne_straight_line_drawing(sparse(suite(i).a));
> gplot(suite(i).a,X)
> pause
> end
>
> Unfortunately it uses mex files, so to use it in the contest, one would have to code it yourself.
>
> It can also be used to find the maximal planar subgraph for the non-planar cases and then add back the non-planar edges. This should also be a very competitive approach and is very popular in the academic literature. I think there's a lot of points still on the table.
>
> Wish I had more time to spend on these ideas myself.
>
> Cheers
> Hannes

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: David Hruska

Date: 5 Nov, 2012 15:33:22

Message: 23 of 39

> Hi,
> I think there is still something wrong with number of knots.
> One of the rule is "A node sitting directly on a line counts as two
> knots."
> For simple set of 4 points:
> xy=[-1,0;1,0;0,1;0,0] and a=[0 1 0 0
> 1 0 0 0
> 0 0 0 1
> 0 0 1 0];
> number of knots should be 2, but numKnots returns 1
> and for xy=[-2,0;2,0;-1,0;1,0]; and the same matrix a (one line in other)
> it should be 4 knots, but numKnots returns 1
> PozdrawiAM -
> Andrzej

Hi Andrzej,

Thanks for pointing this out. Indeed there is a bug; however, it turns out
it's the rules that are not quite right. Any given pair of line segments can
intersect at most one time. If a node is sitting directly on a segment, that
still counts as just one intersection.

When we wrote the bullet point "A node sitting directly on a line counts as
two knots" we must have been thinking about the example in the rules where
each node is connected to two other nodes. In that specific case, the
statement makes more sense but it is not correct in general.

Hope this helps.

Regards,
David
MATLAB Contest Team

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: David Hruska

Date: 5 Nov, 2012 16:17:30

Message: 24 of 39

"David Hruska" <dhruska@mathworks.com> wrote in message
news:k78m84$ft8$1@newscl01ah.mathworks.com...
>> Hi,
>> I think there is still something wrong with number of knots.
>> One of the rule is "A node sitting directly on a line counts as two
>> knots."
>> For simple set of 4 points:
>> xy=[-1,0;1,0;0,1;0,0] and a=[0 1 0 0
>> 1 0 0 0
>> 0 0 0 1
>> 0 0 1 0];
>> number of knots should be 2, but numKnots returns 1
>> and for xy=[-2,0;2,0;-1,0;1,0]; and the same matrix a (one line in other)
>> it should be 4 knots, but numKnots returns 1
>> PozdrawiAM -
>> Andrzej
>
> Hi Andrzej,
>
> Thanks for pointing this out. Indeed there is a bug; however, it turns out
> it's the rules that are not quite right. Any given pair of line segments
> can intersect at most one time. If a node is sitting directly on a
> segment, that still counts as just one intersection.
>
> When we wrote the bullet point "A node sitting directly on a line counts
> as two knots" we must have been thinking about the example in the rules
> where each node is connected to two other nodes. In that specific case,
> the statement makes more sense but it is not correct in general.
>
> Hope this helps.
>
> Regards,
> David
> MATLAB Contest Team

The rules are now updated.

Regards,
David

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Andrzej Miekina

Date: 5 Nov, 2012 17:21:06

Message: 25 of 39

"David Hruska" <dhruska@mathworks.com> wrote in message <k78m84$ft8$1@newscl01ah.mathworks.com>...
> > Hi,
> > I think there is still something wrong with number of knots.
> > One of the rule is "A node sitting directly on a line counts as two
> > knots."
> > For simple set of 4 points:
> > xy=[-1,0;1,0;0,1;0,0] and a=[0 1 0 0
> > 1 0 0 0
> > 0 0 0 1
> > 0 0 1 0];
> > number of knots should be 2, but numKnots returns 1
> > and for xy=[-2,0;2,0;-1,0;1,0]; and the same matrix a (one line in other)
> > it should be 4 knots, but numKnots returns 1
> > PozdrawiAM -
> > Andrzej
>
> Hi Andrzej,
>
> Thanks for pointing this out. Indeed there is a bug; however, it turns out
> it's the rules that are not quite right. Any given pair of line segments can
> intersect at most one time. If a node is sitting directly on a segment, that
> still counts as just one intersection.
>
> When we wrote the bullet point "A node sitting directly on a line counts as
> two knots" we must have been thinking about the example in the rules where
> each node is connected to two other nodes. In that specific case, the
> statement makes more sense but it is not correct in general.
>
> Hope this helps.
>
> Regards,
> David
> MATLAB Contest Team
Hi David,
Thanks for your answer. I agree for my 1st example - it should be 1 knot (I interpreted the rules literally), but for the second I'm not sure it's only one knot - for me it is rather infinity knots.
PozdrawiAM
Andrzej

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: David Hruska

Date: 5 Nov, 2012 18:37:41

Message: 26 of 39

"Andrzej Miekina" <a.miekina@ire.pw.edu.pl> wrote in message
news:k78si2$c5j$1@newscl01ah.mathworks.com...
> "David Hruska" <dhruska@mathworks.com> wrote in message
> <k78m84$ft8$1@newscl01ah.mathworks.com>...
>> > Hi,
>> > I think there is still something wrong with number of knots.
>> > One of the rule is "A node sitting directly on a line counts as two
>> > knots."
>> > For simple set of 4 points:
>> > xy=[-1,0;1,0;0,1;0,0] and a=[0 1 0 0
>> > 1 0 0 0
>> > 0 0 0 1
>> > 0 0 1 0];
>> > number of knots should be 2, but numKnots returns 1
>> > and for xy=[-2,0;2,0;-1,0;1,0]; and the same matrix a (one line in
>> > other) it should be 4 knots, but numKnots returns 1
>> > PozdrawiAM -
>> > Andrzej
>>
>> Hi Andrzej,
>>
>> Thanks for pointing this out. Indeed there is a bug; however, it turns
>> out it's the rules that are not quite right. Any given pair of line
>> segments can intersect at most one time. If a node is sitting directly on
>> a segment, that still counts as just one intersection.
>>
>> When we wrote the bullet point "A node sitting directly on a line counts
>> as two knots" we must have been thinking about the example in the rules
>> where each node is connected to two other nodes. In that specific case,
>> the statement makes more sense but it is not correct in general.
>>
>> Hope this helps.
>>
>> Regards,
>> David
>> MATLAB Contest Team
> Hi David,
> Thanks for your answer. I agree for my 1st example - it should be 1 knot
> (I interpreted the rules literally), but for the second I'm not sure it's
> only one knot - for me it is rather infinity knots.
> PozdrawiAM Andrzej
>

It comes down to whether we're counting knots as the number of intersection
points or the number of lines that intersect. I can see arguments for both
definitions being valid, but in this case, we've chosen the latter. It's
just a matter of convention.
 

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Nicholas Howe

Date: 5 Nov, 2012 20:47:08

Message: 27 of 39

Thanks Hannes, for sharing your knowledge of the body of known work out there!

Some of these graph layouts can be quite attractive. I'm interested in any entries that people have come up with that they find aesthetically pleasing. Of my own submissions I remain fond of Black Widow (67756) and Orb Weaver (67754), although they are not competitive in terms of score.

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Richard Zapor

Date: 6 Nov, 2012 01:13:09

Message: 28 of 39

I have re-run try146 which is leading with a score of 1307.67 and a time of 46.97.

The duplicate file re-run, try146 timechk, scores 1309.88 with a time of 48.145.

Please re-run try146 as it appears to have been on speedburst.

A delta time of 1.17 seconds is huge.

Thank You,
Richard Zapor

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: David Hruska

Date: 6 Nov, 2012 02:34:20

Message: 29 of 39

"Richard Zapor" <razapor@raytheon.com> wrote in message
news:k79o75$pvh$1@newscl01ah.mathworks.com...
> I have re-run try146 which is leading with a score of 1307.67 and a time
> of 46.97.
>
> The duplicate file re-run, try146 timechk, scores 1309.88 with a time of
> 48.145.
>
> Please re-run try146 as it appears to have been on speedburst.
>
> A delta time of 1.17 seconds is huge.
>
> Thank You,
> Richard Zapor

Hi Richard,

I appreciate the frustration when equivalent entries don't yield equivalent
scores. We see this performance variability, along with incessant tweaking
of constants and random number seeds, as the part of the nature of the
contest itself. However, over the years we've also seen that the winning
entry will not be determined by a timing issue alone; algorithmic
improvements are much more important. So my advice is to not get too caught
up in these variations and instead focus on developing the next algorithmic
breakthrough.

Regards,
David
MATLAB Contest Team

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Richard Zapor

Date: 6 Nov, 2012 03:14:08

Message: 30 of 39

Time Instability of +/- 2 seconds is a little large.

Tweaks should suffer the uncertainty of 50 msec in timing.

However, I am observing very large time variations and they are growing.

My invalid lead with "try14 twk" being gifted a time of 46.868 sec and a leading score of 1307.37.

A re-run of "try14 twk" scored 48.738 seconds, 1.87 seconds variation, and a score of 1311.03.

I also saw a 0.4 second change by changing a name from ss to d, try14 spoorthy Nov 06 01:27.

The true leader, with algorithm enhancement is "Reduced Sets" . Oh, that is also mine.

There were multiple valid lead changes that have been lost due to the try146 and try14 twk timing inaccuracies.

My suggestion would be to vet all new leaders.

The alternate solution is to re-score when significant timing errors, > 2.0 scoring, are identified.

Final suggestion, please place a fan blowing on the computer.

Having a great time.

These suggestions are only to make the contest maximally enjoyable for all.

Thank You,
Richard Zapor

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: David Hruska

Date: 6 Nov, 2012 13:51:23

Message: 31 of 39

"Richard Zapor" <razapor@raytheon.com> wrote in message
news:k79va0$j5m$1@newscl01ah.mathworks.com...
> Time Instability of +/- 2 seconds is a little large.
>
> Tweaks should suffer the uncertainty of 50 msec in timing.
>
> However, I am observing very large time variations and they are growing.
>
> My invalid lead with "try14 twk" being gifted a time of 46.868 sec and a
> leading score of 1307.37.
>
> A re-run of "try14 twk" scored 48.738 seconds, 1.87 seconds variation, and
> a score of 1311.03.
>
> I also saw a 0.4 second change by changing a name from ss to d, try14
> spoorthy Nov 06 01:27.
>
> The true leader, with algorithm enhancement is "Reduced Sets" . Oh, that
> is also mine.
>
> There were multiple valid lead changes that have been lost due to the
> try146 and try14 twk timing inaccuracies.
>
> My suggestion would be to vet all new leaders.
>
> The alternate solution is to re-score when significant timing errors, >
> 2.0 scoring, are identified.
>
> Final suggestion, please place a fan blowing on the computer.
>
> Having a great time.
>
> These suggestions are only to make the contest maximally enjoyable for
> all.
>
> Thank You,
> Richard Zapor


We're now entering the final hours of the contest. Rest assured that we will
not let timing discrepancies determine the winner. Retiming and rescoring
entries as well as throwing out any entries which are exact duplicates of
previously submitted entries are all on the table to ensure we have a fair
winner. Hopefully we will have a decisive enough winner that these
technicalities don't matter anyway.

Regards,
David

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Richard Zapor

Date: 7 Nov, 2012 17:15:10

Message: 32 of 39

I want a meeting with the League Commissioner. My "Million saru #7" utilized str2num to maximally minimize the code size. The mtree('jiggle=[ones(1,15) 2*ones(1,15) ones(1,8)]').count is 19 while mtree('jiggle=str2num(''[ones(1,15) 2*ones(1,15) ones(1,8)]'')').count was tremendous 6. Five of my entries bonked. Both my R2012a and R2012b run the code perfectly for the test suite and score approximately 1522 in 9 seconds. Those 13 points would shift my score from 1261.57 to very close to 1261.

If anyone gets close I will want to appeal to the replay official.
I had tested str2num as being functional.

My challenge flag has been thrown if someone beats me by less than 0.5 pts.

My other entries score 1230, 1232, and 1234.

I am trying to keep this dispute light hearted.

Thank You,
Richard Zapor

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Richard Zapor

Date: 7 Nov, 2012 17:43:08

Message: 33 of 39

I can't run the winning solution.
It calls "nanmin" which is a special statistics toolbox function.

Per the rules this is not allowed.

"Allowable functions are those contained in the basic MATLAB package available in $MATLAB/toolbox/matlab, where $MATLAB is the MATLAB root directory. Functions from other toolboxes are not available. All entries are tested against the latest version of MATLAB. (See Resources.)"

I believe the Cheese entry should be disqualified.

Sorry for being a pain but rules are rules.

Thank You,
Richard Zapor

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Nicholas Howe

Date: 7 Nov, 2012 17:44:09

Message: 34 of 39

Results are not all processed yet but Raphael Candelier's entry looks fabulous -- a new process that makes a big difference. Win or lose, well done! Raphael, if you are reading this, do you want to give us some insight about what your 'slipknot' code does?

On another note, I looked into the perfect plane-drawing algorithms suggested by Hannes. Looking at the leading code as of last night on the test suite, a perfect planar solver would only offer a 14-knot improvement over the entire set. And the algorithms are involved enough that you would pay much of that back in complexity penalty. So I ended up abandoning my attempt to implement that approach. But I'm curious -- did anyone else actually get a perfect solver working for planar graphs?

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Hannes Naudé

Date: 7 Nov, 2012 19:10:12

Message: 35 of 39

"Nicholas Howe" wrote in message <k7e6l8$b3l$1@newscl01ah.mathworks.com>...
> Results are not all processed yet but Raphael Candelier's entry looks fabulous

Now there's the understatement of the year ;-). 190 points at this stage of the contest is un-be-friggin-lievable. My first thought was that we had been Welched one last time (was toying with the idea of doing something with complex numbers myself. The contest machinery does not appear to check for this.). Also, there's no nanmin in cheeese and it runs perfectly here on my 2012a.

>a new process that makes a big difference. Win or lose, well done! Raphael, if you are reading ?>this, do you want to give us some insight about what your 'slipknot' code does?

+1. For that matter I'm still not sure about what most of Alfonso's code does either. Would love some pointers.

> On another note, I looked into the perfect plane-drawing algorithms suggested by Hannes. Looking at the leading code as of last night on the test suite, a perfect planar solver would only offer a 14-knot improvement over the entire set. And the algorithms are involved enough that you would pay much of that back in complexity penalty. So I ended up abandoning my attempt to implement that approach. But I'm curious -- did anyone else actually get a perfect solver working for planar graphs?

Not me. But I didn't even try. Knew I wouldn't get it done in time.

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Hannes Naudé

Date: 7 Nov, 2012 19:32:08

Message: 36 of 39

"Hannes Naudé" wrote in message <k7ebmk$29t$1@newscl01ah.mathworks.com>...
>Also, there's no nanmin in cheeese and it runs perfectly here on my 2012a.

Sorry, I meant cheeeese, not cheeese.

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Raphael Candelier

Date: 7 Nov, 2012 21:19:21

Message: 37 of 39

Hi all,

   First of all, I'm sorry for the nanmin issue. I routinely use this function and didn't even know it's part of a toolbox. By the way when one thinks about it, it's a bit strange that nanmin, nanmean and so on are in a toolbox since they are very usefull in general programming. If some of the people who are developping Matlab are reading this, maybe you should consider to put them in the standard edition in the future.

   Also I can't explain why it worked on the server ; maybe there is an issue here for the organizers ?

   Anyway, by chance I saw it and modified slightly the code : the first rank entry (cheeeese) is nanmin free.

> Now there's the understatement of the year ;-). 190 points at this stage of the contest is un-be-friggin-lievable.

   Thank for the warm comment. That's a big leap indeed !

   Here is how the slipknot works, in a few words: I noticed that the solutions generated by Hannes and Alphonso (great work guys, by the way) are basically meshes with long crossing edges here and then. One could gain a few knots on every puzzle (and minimise the weighted distance issue, but that's a side effect) simply by cleverly moving some nodes. To do so the nodes should be moved either inside their "voronoi" cell or somewhere outside the mesh. And a few nodes per puzzles rapidly makes hudred of points at the end of the day !

   So at this point, the whole trick is to know what you put in "cleverly move the nodes". I choosed brute force. This was an option because the nodes had to be on discrete position, so there was just a limited number of locations to check. I therefore defined a grid envelopping the whole mesh, whose binning could be tuned, and computed the gain map for moving every node in every position, one at a time (gain = knots + weighted distance). Performance was then the issue, so I had to use 4D arrays in the function that compute the gain map and fine tune the grid binning. Some other cheese submissions where very badly rated because the binning was to fine. I believe that if the contest had to run for another week, there is still room for nice score drops with fine tuning.

   So here we are. There are still some submissions in the queue, so let's cross the finger (because there is no penalty for fingers :-)

Regards,

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Helen Chen

Date: 8 Nov, 2012 19:06:16

Message: 38 of 39

Dear MATLAB Community -

I just want to add a big congratulations from the MATLAB contest
team to Raphaël Candelier on his contest winning submission Cheeeese!
( http://www.mathworks.com/matlabcentral/newsreader/author/151724 )
( http://www.mathworks.com/matlabcentral/contest/contests/38/submissions/69639 )
 
For being the Knots Grand Prize Winner, he will receive the Grand Prize
gift package. I do look forward to reading Raphaël's bio on our Contest Hall
of Fame. I am hoping that he includes some fun information about how he
uses MATLAB for zebrafish neuroimagery! :-)
( http://www.mathworks.com/matlabcentral/contest/hall_of_fame )

Each of our Knots Contest prize winners will receive a certificate of achievement and a gift from the MATLAB Central Community.

Thank you to each of you who participated in the Knots Contest, our last event in this series. Your participation in this event made it such a very special event for the contest team.

Thank you also to everyone who participated in the previous seasons of contests. Each of our contests brought such fun conversations and game-play to our community. There were so many memorable moments over the seasons. We truly appreciate your dedication to our contests and to our community. We hope to that you will continue participate at MATLAB Central to learn new things, share your knowledge and, above all, have fun with MATLAB!

See you all online!
Helen and the MATLAB Contest Team

"Hannes Naudé" wrote in message <k7ecvo$7es$1@newscl01ah.mathworks.com>...
> "Hannes Naudé" wrote in message <k7ebmk$29t$1@newscl01ah.mathworks.com>...
> >Also, there's no nanmin in cheeese and it runs perfectly here on my 2012a.
>
> Sorry, I meant cheeeese, not cheeese.

Subject: Fall 2012 MATLAB Contest: October 31 - November 7

From: Steven_Lord

Date: 8 Nov, 2012 21:59:12

Message: 39 of 39



"Richard Zapor" <razapor@raytheon.com> wrote in message
news:k7e4uu$4tl$1@newscl01ah.mathworks.com...
> I want a meeting with the League Commissioner. My "Million saru #7"
> utilized str2num to maximally minimize the code size. The
> mtree('jiggle=[ones(1,15) 2*ones(1,15) ones(1,8)]').count is 19 while
> mtree('jiggle=str2num(''[ones(1,15) 2*ones(1,15) ones(1,8)]'')').count was
> tremendous 6. Five of my entries bonked. Both my R2012a and R2012b run the
> code perfectly for the test suite and score approximately 1522 in 9
> seconds. Those 13 points would shift my score from 1261.57 to very close
> to 1261.
>
> If anyone gets close I will want to appeal to the replay official.
> I had tested str2num as being functional.
>
> My challenge flag has been thrown if someone beats me by less than 0.5
> pts.

I'm not a member of the Contest team so this isn't official. But I do have
one observation.

Even though your "Million saru #7" didn't have the lowest score at the end
of the contest, it looks like you have one more achievement about which you
can brag. With a submission date of 2012-11-07 15:59:55 UTC, five seconds
before the end, it looks like your "Maximus jiggle 10 110" submission:

http://www.mathworks.com/matlabcentral/contest/contests/38/submissions/69765

was the last entry in the last official MATLAB Programming Contest in this
format.

http://blogs.mathworks.com/contest/2012/10/31/the-end-of-an-era/

You wrote the "series finale" for the Contest.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us