|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
RE: Judging
It would be cool to see a list of the finalists posted.
|
|
#17
|
|||
|
|||
|
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?!?
|
|
#18
|
|||
|
|||
|
RE: RE: Judging
Quote:
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. |
|
#19
|
|||
|
|||
|
RE: Judging
As suspected, running the winning code against this maze:
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. |
|
#20
|
|||
|
|||
|
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...
|
|
#21
|
|||
|
|||
|
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 --> |
|
#22
|
|||
|
|||
|
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 |
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > Judging |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|