Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: boundschecking

Author: Severi Salminen

Date: 01:37:31 11/04/02

Go up one level in this thread


>Unfortunately I do not know what is the algorithm that is used by the computer
>to generate random numbers.

Yes, the easiest way to get rid of the problems is to use your own pseudo random
number generator. Make a google search and you'll find 1000+ PRNGs. There are
generators which generate much better numbers than many rand() implementations
and still require very little code.

>A possible solution is simply to copy the numbers that rand64 generates to
>a text file and have a long function to initialize it by some hundreds of lines
>
>zobrist[0][0][0]=
>zobrist[0][0][1]=
>zobrist[0][0][2]=
>
>It may make my code longer
>I do not know if it is a problem that may make it slower relative to the case
>of having a special function.

The above would be a very stupid way to code it. Your source code would look
very ugly. I think there is no need to precompile random numbers. Just check why
the srand() doesn't work and correct it or (better) make your own PRNG. Less
variables when debugging and testing...



This page took 0.01 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.