]> git.sesse.net Git - stockfish/commitdiff
Move magic random to RKISS
authorMarco Costalba <mcostalba@gmail.com>
Wed, 12 Feb 2014 13:47:36 +0000 (14:47 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 12 Feb 2014 13:47:36 +0000 (14:47 +0100)
When initializing the magic numbers used to
compute sliding attacks, we endless generate a
random and test it as a possible magic.

In the general case this takes a lot of iterations,
but here, insteaad of picking a casual random, we
rotate it a couple of times and generate a number that
we know has a good probability to be a magic candidate.

This is becuase the quantities by which we rotate the
number are known in advance to produce quickly a good
canidate.

The patch, inspired by DON, just moves the shuffle to RKISS
changing the boosters to take in account a left rotation
instead of a right rotation as in the original.

No functional change.


No differences found