Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about time.c in crafty

Author: José Carlos

Date: 15:43:21 07/01/04

Go up one level in this thread


On July 01, 2004 at 18:10:54, Robert Hyatt wrote:

>On July 01, 2004 at 16:15:41, Dave Kuntzsch wrote:
>
>>In blitz tournaments I run, Crafty always seems to leave a lot of time on the
>>table at the end, so I took look at time.c to see if there was a reason. There I
>>ran across the 'USAGE' .rc parameter and decided to specify that as 50 in
>>crafty.rc. It made no difference at all. I took a closer look at the code and
>>saw this:
>>time_limit *= 1.0 + usage_level / 100.0;
>>
>>If the purpose is to increase the time limit by some percentage, shouldn't there
>>be parenthesis around the expression like this?
>>time_limit *= (1.0 + usage_level / 100.0);
>>
>>Please correct me if I'm wrong.
>>
>>Dave
>
>Nope.  It is done as this
>usage/100.
> then result + 1.0
>
>Then multiply time by that amount which can be between .5 and 1.5...
>
>It works for me regularly when I fiddle with this...

  I don't remember when I last tested this (I use the parenthesis since then),
but I'm quite sure it didn't work as you describe. IIRC, it was with VC++ 6.0.
Can't check it now, but I'll confirm tomorrow.

  José C.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.