Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to program search timeout ?

Author: Bruce Moreland

Date: 20:01:27 02/04/98

Go up one level in this thread



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.