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:
  #16  
Old March 7th, 2003, 04:43 PM
-vertigo- -vertigo- is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Louth, Lincolnshire
Posts: 314 -vertigo- User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 24 sec
Reputation Power: 2
[DNO] Food for thought

This contest reminds me of the infamous discs contest.

The duplicates caused major trouble for most people, but the winner realised that there was far too little time to use logic to handle the duplicates when large stacks were used.

He handled the duplicates in a totally simple way, and optimised for large stacks.

Similarly, the winner of this one will likely use simple logic and optimise the 50x50x8 cases.

It surely won't be possible to analyse all potential removals to determine the most promising one on each move, it seems too complex.

Lets look at this grid.

123
211
332

The most promising starting moves seem to be (1, 2), (2, 1) and (3, 1).

The first two produce scores of 21, and the last produces a score of 23. I don't see any logical way of determining that the third possibility is better than the other two.

Of course, thinking like this is a bad idea, because the large grids will determine the winner, not the small ones.

Reply With Quote
  #17  
Old March 7th, 2003, 04:44 PM
mcoder mcoder is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 130 mcoder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: [DNO] Scoring System Benchmark

>$start=time()+microtime();

This timing routine is false !
Suppose you start to use it at 22s 999999.
time() will return 22, and microtime() will return 0.
So you have one second of difference !

Personally, I use:
$time=explode(" ",microtime());
return $time[1]+$time[0];

JC

Reply With Quote
  #18  
Old March 7th, 2003, 05:04 PM
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: [DNO] Food for thought


Quote:
Of course, thinking like this is a bad idea, because the large grids will determine the winner, not the small ones.


Ahhh..but if everyone uses the same dumb algorithm to get through the big ones then the contest will be one with the small ones ;)

Reply With Quote
  #19  
Old March 7th, 2003, 10:26 PM
pickleman78 pickleman78 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Dallas,TX,USA
Posts: 582 pickleman78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to pickleman78
RE: [DNO] Scoring System Benchmark

lol
101 seconds on my 566 celeron POS
You and your nefangled lotsd of ghz. Too bad new computers cost money, I spent all of 50 bucks on this piece of crap, but hey, it runs

Reply With Quote
  #20  
Old March 8th, 2003, 07:51 AM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,326 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 15677 Folding Title: Novice Folder
Time spent in forums: 6 Days 9 h 32 m 40 sec
Reputation Power: 4
RE: [DNO] Scoring System Benchmark

55,10490500927 seconds

Maybe this Pentium II 450MHz isn't so slow after all.

Reply With Quote
  #21  
Old March 8th, 2003, 01:14 PM
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: [DNO] Scoring System Benchmark

How about giving some kind of "codewalker rating" when comparing individual progress on contest scripts? Like "my script finishes in 10.3 seconds at a cwr of 1.42854" or a shorter "10.3 s @ 1.42854 cwr". Or you could use your cwr to calculate an estimated time and post that if you prefer.

I edited the original script by Matt by adding the new timelimit setting and cw_rating calculation plus it's echoing:

php Code:
Original - php Code
  1.  
  2. <?php
  3. set_time_limit(300); // 5 mins should be enough
  4.  
  5. function getmicrotime(){
  6.     list($usec, $sec) = explode(" ",microtime());
  7.     return ((float)$usec + (float)$sec);
  8.     }
  9.  
  10. $time_start = getmicrotime();
  11.    
  12. for ($i=0; $i < 26000000; $i++);
  13.  
  14. $time_end = getmicrotime();
  15. $time = $time_end - $time_start;
  16. $cw_rating = 30 / $time;
  17.  
  18. echo "Script ran $time seconds<br>Your Codewalkers-Ratig is $cw_rating";
  19. ?>


BTW: my PIII 450 MHz needs 60 secs to complete. On my P1 166 MHz I wasn't able to get a result in any browser, they all timed out before the script was through ;)
Maybe I should give the command line a try...

Reply With Quote
  #22  
Old March 8th, 2003, 01:35 PM
mcoder mcoder is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 130 mcoder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: [DNO] Scoring System Benchmark

Good idea !
But, I get a cwr varying from 2.40 to 2.82.

JC

Reply With Quote
  #23  
Old March 9th, 2003, 08:28 PM
fractalbit fractalbit is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 108 fractalbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: [DNO] Scoring System Benchmark

Lets have more realistic results than just a for loop that does nothing. Matt please modify the following code to run at about 30 seconds on the testing machine. As it currently is, it runs on 13.7secs on mine(AthlonXP 1800+)

php Code:
Original - php Code
  1.  
  2. <?php
  3. function getmicrotime(){
  4.     list($usec, $sec) = explode(" ",microtime());
  5.     return ((float)$usec + (float)$sec);
  6.     }
  7.  
  8. $time_start = getmicrotime();
  9.  
  10. $max = 0;   
  11. for ($i=0; $i < 3050000; $i++){
  12.    $x = rand(40, 100);
  13.    $z = rand(50, 60);
  14.    $y = $x + $z;
  15.    if($y>$max) $max = $y;   
  16. }
  17.  
  18. $time_end = getmicrotime();
  19. $time = $time_end - $time_start;
  20.  
  21. echo "MAX = $max - $time seconds";
  22. ?>

Reply With Quote
  #24  
Old March 11th, 2003, 11:05 AM
nodream nodream is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Norway
Posts: 22 nodream User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 59 sec
Reputation Power: 0
RE: [DNO] Scoring System Benchmark

On my PII-350 I get 75sec.

How reliable is this time?
Is it safe to work whit a timelimit of 75 sec on my computer, and it will roughly (+/- 1sec) get a runtime of 30 sec on the scoring-macine.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > [DNO] Scoring System Benchmark


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 3 hosted by Hostway