SunQuest
           Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #16  
Old May 17th, 2002, 09:21 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Judging

It would be cool to see a list of the finalists posted.

Reply With Quote
  #17  
Old May 17th, 2002, 09:58 AM
Laxersaz Laxersaz is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Neuss, NRW, Germany
Posts: 21 Laxersaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Laxersaz Send a message via AIM to Laxersaz
RE: Judging

Congrats to Scott! That was a very well crafted piece of code. Why don't we all stop discussing about the judgement and give our favorite language PHP a nice big hug?!?

Reply With Quote
  #18  
Old May 17th, 2002, 10:15 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to EvilivE
RE: RE: Judging


Quote:
fair enough.

It does work if the start is inside the outside wall.

Why that regulation? What difference does it make to coding?


Can't answer why that regulation. However, the difference it makes in coding is this:

Knowing that the perimeter of the maze can only be a 'W' or an 'E' there is no reason to check those rows/columns for an 'S'. This in turn saves time.

Reply With Quote
  #19  
Old May 17th, 2002, 10:21 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to EvilivE
RE: Judging

As suspected, running the winning code against this maze:

php Code:
Original - php Code
  1.  
  2. WWWSWWW
  3. W     W
  4. WWW WWW
  5. WWW WWW
  6. W     W
  7. W WW WW
  8. W     W
  9. WWWEWWW


It really doesn't even solve it. Is this a flaw ... NO, should it be able to solve it ... NO.

The winning code simply followed the specifications that the customer/administrator had required. Nothing more, nothing less.

Reply With Quote
  #20  
Old May 27th, 2002, 04:42 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Judging

I just looked over your script and I remember it. I did enjoy your script, especially the animation portion. I do not have the run times here with me now, they are at my office. I will check them on Tuesday and let you know what they were. If I remember correctly, your script came in second place. By your own calculations, you admit that Scott's script is faster. I wish I could reward all submissions with a t-shirt, but I am only given one per a contest. I also have scott's modified script at my office with the time calculation code in it. I will check that also on Tuesday...


Reply With Quote
  #21  
Old May 27th, 2002, 05:28 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Judging

hi all!

I have to argue about Matt’s judging. My maze solver script has approximately the same speed as the winning script.

(First to apologize about 10 day delay in me testing scripts and noticing this, but I was out of town, and didn’t have much time since I came back)

Note that I didn’t say my script is faster… And nether script can be much faster because they use the same algorithm. They both use the (at my best knowledge) so-called “Breadth first search” algorithm that marks traversable squares in a maze by the number of steps that are needed to get to that square. After it finishes, it traverses back, and finds the actual exit path.

The only difference between my and the winning script is in starting and ending point. My script starts (surprise) at the “Start” or “S” square, and loops until it finds “Exit” or “E” square, and the winning script does the opposite. It starts at the “E” square and loops to the “S” square. Nether of these approaches is formally better, but each can produce a faster solution, depending on a test maze used.

For example, the winning script is 17% faster then my on a crazy.txt maze, but my script is 15% faster on big.txt maze!

Both scripts solved the open.txt maze at approximately the same speed, and on cw.txt my script was 11% slower… so average difference was (+17-15+0+11)/4=13/4=3%. Scott’s script IS faster then my, but only by 3% on my speed tests. And that 3% is very near margin of test error, and not like Matt said “consistently below all other submissions”.

(I also tested each script with each maze 10 times, and calculated the average. Also to note that my script doesn’t produce errors or warnings.)

I can only imagine where Matt made a mistake. Scott’s (winning) script prints the number of steps as soon as it calculates it. But the script is not finished there. It still has to find a path, and that’s the second part of algorithm. Matt could miss this, and place a time testing code there (around line 170), and that could measure less time.

If this shows to be the case, or if by any other reason Matt decides to give me a reword, I would settle for an “PHP Addict” T-shirt as a comforting reword. ;)

To prove all this, I will post both my, and winning scripts with test code added, so that anyone can verify this in less then 24 hours (my server is down)…

ih! ;)
zombie

NOTE: CONTINUED ON NEXT PAGE -->

Reply With Quote
  #22  
Old May 28th, 2002, 02:23 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Judging

hi matt & all!

since matt said that he had fun with my script, i posted it, so u can see my code in action at:

http://www.fazi.co.yu/z/maze.php

check out the "animation" view... and check my script with big.txt, crazy.txt, open.txt and cw.txt.. (but i recomend "text" view for those... they are BIG)

i also posted all files i promised to:

http://www.fazi.co.yu/z/maze.zip

Note that for test purposes I added a die() command in each script right after it prints time needed. kill it to see the script in action.

ps. matt. can u list all the finalists, and their times (on Tuesday), and tell which script was "pritiest". (i mean tell that my was pritiest) ;)

ih! ;)
zombie

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > Judging


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway