Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Fall 2008 MATLAB Contest, November 5th-12th
Date: Fri, 7 Nov 2008 04:55:03 +0000 (UTC)
Organization: Ohio Supercomputer Ctr
Lines: 14
Message-ID: <gf0hn7$jbn$1@fred.mathworks.com>
References: <ger09l$7v0$1@fred.mathworks.com> <gesrql$476$1@fred.mathworks.com> <bb078bed-9695-4efd-a866-e5e5a652cf42@r15g2000prh.googlegroups.com> <gevfju$q8d$1@fred.mathworks.com> <gevpki$bt2$1@fred.mathworks.com> <gf04fe$1fo$1@fred.mathworks.com> <gf0701$k88$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1226033703 19831 172.30.248.35 (7 Nov 2008 04:55:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 7 Nov 2008 04:55:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 649595
Xref: news.mathworks.com comp.soft-sys.matlab:499434


"Nicholas Howe" <NikHow@hotmail.com> wrote in message <gf0701$k88$1@fred.mathworks.com>...
> > A lot of my entries in Twilight are timing out.  I suspect this is because Jan's winning entry takes much longer to run than the original strategy, thus leaving essentially no time for the contender.  Is this true?  Can the contest machinery adjust the time computation by subtracting the time taken by the "house ant" software?
> 
> I have confirmed this by submitting the default solver again.  The Matlab team's original entry took 75 seconds to run; my resubmission of an identical program running against Jan's code took 147 seconds.

There is definitely something weird going on that I don't quite understand yet, but have a good idea on.  The 'default entry was VERY SIMPLE, with only  2 calls to rand and round.  It doesn't add anything to the cyc score or to the total execution time because it's so simple.  As Nicholas points out, it take 147 seconds to run.  

However, the current leading entry, submitted by Vishal, is 39 times as complicated according to the cyc and 10 times as long code wise.  YET it runs in only 107 secs, shaving almost 30% off the run time.  

Obviously this solver takes longer to actually execute since it's more complicated code, thus the time savings must be in the way the armyantsimulator code processes the outputs from the solver.  I've profiled the armyantsimulator code and found that the 2 lines that take the majority of the time are the call to the solver and the  update world one.  Both of these are nested inside loops and get called repeatedly for the number of ants still alive (BOOOO for for loops.  Couldn't the contest team vectorize this somehow?)

As an experiment I submitted the simplest of all possible solvers.  It always returns no move, no action, no mark.  And yet this code timed out.  This leads me to a big conclusion:  The only way to play this game is to go on the active hunt and attack and kill the opposing ants immediately.  Unless you reduce the number of ants on the board very quickly, your code will time out.   If this is indeed the case, it's kind of a bummer, since there might be some very cool searching / evade algorithms, as alluded to in the rules, but we'll never be able to use them due to the time limits.

Matthew:  When you guys ran this contest internally did you have similar issues with a lot of entries timing out and having to 'go on the attack right away?