Got Questions? Get Answers.
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:
MATLAB Programming Contest: Sept 17-24th

Subject: MATLAB Programming Contest: Sept 17-24th

From: MATLAB Contest Team

Date: 16 Sep, 2001 22:49:36

Message: 1 of 17

Hi,
 

 The latest MATLAB Programming Contest is running from September 17-24.
  You can access the contest from the MATLAB Central page at:
 

   http://www.mathworks.com/matlabcentral <http://www.mathworks.com/matlabcentral>
 

 This contest is a variation of the classic Mastermind(r) puzzle; each
 contest entry does its best to determine unknown sequences of colored
 pegs. These contests have been a lot of fun; they're a great way to
 learn new programming tricks, as well as show off the ones you have.
 

 The contest will start on September 17; if you have any questions on
 the contest feel free to post under this thread, or contact the MATLAB
 Contest team at contest@mathworks.com.
 

 Good luck!
 

 -- The MATLAB Contest Team

Subject: MATLAB Programming Contest: Sept 17-21st

From: MATLAB Contest Team

Date: 17 Sep, 2001 09:37:47

Message: 2 of 17

The contest is up and running at MATLAB Central.
 

 http://www.mathworks.com/matlabcentral <http://www.mathworks.com/matlabcentral>
 

 The end date in the previous post was a typo. It will end on Friday
 the 21st.
 

 Good luck!
 

 -- The MATLAB Contest Team

Subject: Error Line numbers MATLAB Programming Contest

From: Ed Manlove

Date: 17 Sep, 2001 11:24:43

Message: 3 of 17

Could it be possible to post the line number of the error for those
 who don't have ML6 at work?

Subject: Error Line numbers MATLAB Programming Contest

From: Matthew Simoneau

Date: 18 Sep, 2001 10:55:34

Message: 4 of 17

> Could it be possible to post the line number of the error
 > for those who don't have ML6 at work?
 

 There is definitely some room for improvement in the error messages.
 I'll add this to my list.
 

 Thanks for your feedback and have fun.
 

 Matthew J. Simoneau
 Internet Integration Team
 The MathWorks, Inc.

Subject: MUNLOCK

From: E. Brian Welch

Date: 19 Sep, 2001 01:03:27

Message: 5 of 17

I apologize. I was just playing around to see if I could cheat
 somehow, and it seems that the submission file is locked into a
 version that produces an error. I'm confused because I was able to
 unlock the file once before.
 

 sincerely,
 Brian

Subject: MUNLOCK

From: E. Brian Welch

Date: 19 Sep, 2001 01:32:57

Message: 6 of 17

I tried to reset the queue with munlock commands. I think my first
 one with a W% of -8.11 did something really weird. I'm sure the
 Mathworks people will reset everything in the morning and filter out
 my crap. Again I am sorry for the lost contest time.
 

 Brian
 >
 >
 > I apologize. I was just playing around to see if I could
 > cheat
 > somehow, and it seems that the submission file is locked
 > into a
 > version that produces an error. I'm confused because I was
 > able to
 > unlock the file once before.
 >
 > sincerely,
 > Brian
 >

Subject: MUNLOCK -- Cheapest Hack

From: Heinrich Acker

Date: 19 Sep, 2001 03:21:24

Message: 7 of 17

Hi,
 

  when looking at 'persistence', I found a way to cheat that
  works at least on my machine. It receives a perfect score
  and should be made impossible as well. Look how simple it is:
 

  function finalAnswer=solver(numPegs,numColors,guessLimit,puzzleID)
 

  puzzle=getpuzzle(puzzleID);
  finalAnswer=puzzle.solution;
 

 Heinrich

Subject: MUNLOCK

From: Nabeel

Date: 19 Sep, 2001 03:45:12

Message: 8 of 17

Hi all,

> [...] I'm sure the
> Mathworks people will reset everything in the morning and filter out
> my crap.

Hey, are you trying to keep me up all night figuring out what you did?
;) Actually, it was pretty clever; for those that don't follow what
Brian did, we'll write about it in the post-contest analysis.

> I tried to reset the queue with munlock commands.

Because of the first MLOCK, the subsequent MUNLOCK commands won't be
seen.

> Again I am sorry for the lost contest time.

Actually, I don't think things will be that bad. After tweaking our
"prohibited functions" list and rerunning entries after your first, all
of your entries will be failed before being run. This should take just
a few minutes, and it shouldn't hold back the contest at all - the queue
will get really long but should go by very quickly.

As for this one, posted by Heinrich:

> puzzle=getpuzzle(puzzleID);
> finalAnswer=puzzle.solution;
 
that won't work - we don't allow you to use "getpuzzle". But it has
been tried a few times!

-- Nabeel

Subject: MUNLOCK

From: Heinrich Acker

Date: 19 Sep, 2001 09:09:36

Message: 9 of 17

Hi,
 

 what happens with the attemts to find out solutions by provoking
 errors? If Finn works hard, he will present this in the end:
 

 SWITCH puzzelID
           CASE 1,
             finalAnswer=constant1
           CASE 2
             finalAnswer=constant2
          ...
           
         END
 

 A way to block or use (?) this could be to allow the identifier for
 puzzleID only as an argument to scoreme.
 

 Heinrich

Subject: MUNLOCK

From: Nabeel

Date: 19 Sep, 2001 09:14:07

Message: 10 of 17

Hi,

There's nothing wrong with this, but it's extremely difficult to do
unless you have some vague idea about the puzzles. If you think it will
work, go for it!

This was actually done in the "Mars Surveyor Mission", where we provided
a picture of one of the puzzles. A professor got some of his graduate
students (unfortunately, I don't remember the school or professor) to
hardcode in the solution for the puzzle shown. Because of the
evolutionary nature of the contest, pretty soon all the entries had a
hardcoded solution for this one puzzle!

-- Nabeel




Heinrich Acker wrote:
>
> Hi,
>
>
> what happens with the attemts to find out solutions by provoking
> errors? If Finn works hard, he will present this in the end:
>
>
> SWITCH puzzelID
> CASE 1,
> finalAnswer=constant1
> CASE 2
> finalAnswer=constant2
> ...
>
> END
>
>
> A way to block or use (?) this could be to allow the identifier for
> puzzleID only as an argument to scoreme.
>
>
> Heinrich

Subject: Error Message

From: Ed Manlove

Date: 19 Sep, 2001 12:10:08

Message: 11 of 17

This seems like a strange error
 

 Error using ==> filefilt Unable to
 find "C:\home\contest\submission.m".
 

 with Eliminate Choices 2 submitted by Ed Manlove

Subject: Error Message

From: Nabeel

Date: 19 Sep, 2001 13:33:12

Message: 12 of 17

Hi Ed,

Your file doesn't parse correctly. It has the lines:

  if (white=>numPegs), return, end
  if (numCallsMade=>guessLimit), return, end

You probably want to use >= instead.

You can avoid errors like these by first testing your code against the
test suite we provide; this is one of the reasons that we provide that
test suite!

good luck,

Nabeel

Nabeel Azar
nabeel@mathworks.com



Ed Manlove wrote:
>
> This seems like a strange error
>
>
> Error using ==> filefilt Unable to
> find "C:\home\contest\submission.m".
>
>
> with Eliminate Choices 2 submitted by Ed Manlove

Subject: Error Message

From: Nabeel

Date: 19 Sep, 2001 13:35:19

Message: 13 of 17

By the way, we're also working on improving the error reporting for
files that don't parse correctly, and will also include this information
in the FAQ.

-- Nabeel



Nabeel wrote:
>
> Hi Ed,
>
> Your file doesn't parse correctly. It has the lines:
>
> if (white=>numPegs), return, end
> if (numCallsMade=>guessLimit), return, end
>
> You probably want to use >= instead.
>
> You can avoid errors like these by first testing your code against the
> test suite we provide; this is one of the reasons that we provide that
> test suite!
>
> good luck,
>
> Nabeel
>
> Nabeel Azar
> nabeel@mathworks.com
>
> Ed Manlove wrote:
> >
> > This seems like a strange error
> >
> >
> > Error using ==> filefilt Unable to
> > find "C:\home\contest\submission.m".
> >
> >
> > with Eliminate Choices 2 submitted by Ed Manlove

Subject: Error Message

From: Matthew J. Simoneau

Date: 19 Sep, 2001 13:36:15

Message: 14 of 17

> Error using ==> filefilt Unable to
 > find "C:\home\contest\submission.m".
 

 This is a strange error. It is a side-effect of our submission
 filtering program. It shows up when your submission has a "parse-
 time" error. That is, it has a structural error that prevents it
 from even being run (as opposed to a run-time error). So this code
 does error, it is just showing you the wrong one. I've added this to
 the enhancements list for the next contest.
 

 Sorry about the confusion.
 

 Matthew J. Simoneau
 The MathWorks, Inc.

Subject: Error Message

From: Ed Manlove

Date: 19 Sep, 2001 22:44:27

Message: 15 of 17

Thanks, I found the error in my ways. I must admit my boldness when
 the contest was started was highly overrated. Of course any contest
 that one can easily figure out all the possibilities is no contest.
 And 1.5^45 is a lot of possiblities given 34 pegs and 18 colors.
 

 One thing I found which could be useful is some sort of tree view for
 the entries. After my terrible failures and finally my pitiful new
 begining I looked at the midweek report and realized what I just
 submitted was discussed and submitted by others. I thought about
 reviewing others submissions but by now with ~300 entries I didn't
 know where to begin. With a tree view I can see what where the
 originals and there children in a structured manner. I could open
 and close branches. You could add a tooltip feature like in Simlink
 which tells me author, score, etc.
 

 >
 >
 > By the way, we're also working on improving the error
 > reporting for
 > files that don't parse correctly, and will also include
 > this information
 > in the FAQ.
 >
 > -- Nabeel
 >
 >
 >
 > Nabeel wrote:
 >>
 >> Hi Ed,
 >>
 >> Your file doesn't parse correctly. It has the lines:
 >>
 >> if (white=>numPegs), return, end
 >> if (numCallsMade=>guessLimit), return, end
 >>
 >> You probably want to use >= instead.
 >>
 >> You can avoid errors like these by first testing your
 > code against the
 >> test suite we provide; this is one of the reasons that we
 > provide that
 >> test suite!
 >>
 >> good luck,
 >>
 >> Nabeel
 >>
 >> Nabeel Azar
 >> nabeel@mathworks.com
 >>
 >> Ed Manlove wrote:
 >> >
 >> > This seems like a strange error
 >> >
 >> >
 >> > Error using ==> filefilt Unable to
 >> > find "C:\home\contest\submission.m".
 >> >
 >> >
 >> > with Eliminate Choices 2 submitted by Ed Manlove
 >

Subject: Error Message

From: Alex Backer

Date: 21 Sep, 2001 17:25:31

Message: 16 of 17

Simon,
 

 I have reason to believe that this error comes up when the
 submission's main function is not called solver. Is this possible?
 Could you fix it?
 

 Alex
 

 >
 >
 >> Error using ==> filefilt Unable to
 >> find "C:\home\contest\submission.m".
 >
 > This is a strange error. It is a side-effect of our
 > submission
 > filtering program. It shows up when your submission has a
 > "parse-
 > time" error. That is, it has a structural error that
 > prevents it
 > from even being run (as opposed to a run-time error). So
 > this code
 > does error, it is just showing you the wrong one. I've
 > added this to
 > the enhancements list for the next contest.
 >
 > Sorry about the confusion.
 >
 > Matthew J. Simoneau
 > The MathWorks, Inc.
 >

Subject: Error Message

From: Nabeel

Date: 22 Sep, 2001 00:47:49

Message: 17 of 17

Hi,

I realize that the contest is now over, but in any case:

Simon asked about this:
> >> Error using ==> filefilt Unable to
> >> find "C:\home\contest\submission.m".

Alex wrote:
> I have reason to believe that this error comes up when the
> submission's main function is not called solver. Is this possible?
> Could you fix it?

Actually, it doesn't matter what you call your function. This is caused
by a parse error in your code. The easiest way to verify this is to
just try to run your code; it should error out with a parse error. An
alternative is to just look through it to see if you have any typos,
etc.

-- Nabeel

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