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
  #1  
Old May 24th, 2002, 03:26 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
Timings

The timings ("Speed"). Is that in system time or real time?

It largely makes a different if you're outputting stuff, since the apache process (or IIS thread) will block waiting to shift data out. Personally, I'd prefer it in system time, since that would test the speed of the algorithm more precisely.

On a vaguely unrelated thread, how fast are people managing the games, and what scores are people actually getting? Be nice to know what I'm aiming for. :-)

dave at clues.ltd.uk

Reply With Quote
  #2  
Old May 24th, 2002, 03:46 PM
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 23 sec
Reputation Power: 6
RE: Timings

Quote from the rules:

Quote:
Only the actual playing will be judged for speed. I will add code to your program to capture the start and end times before and after the actual playing is done.


I will add code that will capture the start and stop time for your code. I will only capture the stop and start time of the actual play time. I.e., the time it takes to come up with a solution. If you are displaying output during the time you are coming up with the solution, then it will be included in the time. I recommend holding off the display until after you come up with a solution....


Reply With Quote
  #3  
Old May 24th, 2002, 04:47 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: Timings

Ah, yes, I think you misread my question, though, so let me put it a different way.

Will you be using getrusage() or microtime()?

And while I've your attention, by "solution", does that mean there will actually be a way to complete it entirely?

And will you be using multiple runs with different decks or anything?

Reply With Quote
  #4  
Old May 24th, 2002, 04:54 PM
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 23 sec
Reputation Power: 6
RE: Timings

I will be using microtime(). Now while some may disagree with this, I don't think it is an issue which way I go. Remember, all scripts are on a level playing field. They will all be judged by the same criteria on the same machines etc.

Yes, I will use multiple decks and multiple runs per a deck.

By solution I mean what you come up with. By no means can every deck be completely solved...


Reply With Quote
  #5  
Old May 24th, 2002, 05:26 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: Timings

Okay, thanks for the clarification. I was hoping to cheat by using sub-processes, but now I'll just have to use time-travel. More complex, but I'll manage somehow.

Having reread your previous answer, though, another question.

Is dealing, setup, and initialization of lookup gadgetry counted in your definition of "playing"?

Reply With Quote
  #6  
Old May 24th, 2002, 06:39 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: Timings


Quote:
On a vaguely unrelated thread, how fast are people managing the games, and what scores are people actually getting? Be nice to know what I'm aiming for. :-)



i solve the posted deck.txt in 0.13 seconds with a score of 690. (G4/667; OSX)
but theres no strategy behind it - the simplest tactic yields the best result with this deck.

i wonder if there is a strategy (wich always leads to good results) at all.

the only way to get the best result (everytime) is to store the game at each decision point, and play all possible games (you dont have to play all, but lots of)

i think this is allowed according to the rules...

any other way of coding would make the results highly dependent on the used decks (in this case 4 decks wont be enough to get a fair result)

i am not a native speaker, hope you get what i meant ;-)

i

Reply With Quote
  #7  
Old May 27th, 2002, 05:13 AM
noda noda is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Montreal, Quebec, Canada
Posts: 20 noda 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 noda
RE: deck.txt

Mine completes in 25 milliseconds but has very little "intelligence" - at most games it'll do a very good job, but it doesn't think ahead.

Reply With Quote
  #8  
Old May 28th, 2002, 11:45 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: Timings

Hmmm... 25 milliseconds in elapsed time or actual processor time?

I've noticed a really wide variation between elapsed time (microtime()) and the processor time (getrusage()). Across 500 runs on random decks, I'm taking an average of about 30ms accoridng to getrusage (system and user time added), but closer to 600ms average according to microtime().

I'm not 100% convinced that the timings measured are going to be accurate enough if microtime() is used. Given that we're meant to be measuring the "playing" only, we're not overly keen on subjective time to begin with.

The downside is that, on Linux anyway, there's a relatively high granularity on getrusage(), so we're more likely to go into the appearance tie-break. (And my output leans towards "functional", rather than "pretty".)

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > Timings


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





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