Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to program search timeout ?

Author: Stuart Cracraft

Date: 11:06:47 02/06/98

Go up one level in this thread


Thanks -- I'll try it out this weekend. I've got a couple
of modulos.

On February 04, 1998 at 23:01:27, Bruce Moreland wrote:

>
>On February 04, 1998 at 22:56:56, Bruce Moreland wrote:
>
>>
>>On February 04, 1998 at 20:08:16, Stuart Cracraft wrote:
>>
>
>>>if (SearchDepth == 0 && NodeCnt % TIMECHECK == 0)
>
>>A better idea would be to say:
>
>Great.  If you press "tab" and start writing some C code, while you are
>writing a message, you royally screw yourself.
>
>Anyway.
>
>A better idea would be to say:
>
>        if (!(NodeCnt & (TIMECHECK - 1)))
>
>This assumes that TIMECHECK is a power of 2, so you should protect this
>with an assert someplace, IMHO.
>
>The compiler cannot kill you if you write it this way.
>
>bruce



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.