1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 08:13:08 +00:00

Retire 'Randomness' ucioption

Using multiple threads and good opening book is
much better and more reliable source of randomness than
spoiling psqt-tables

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Joona Kiiski 2010-07-23 09:08:31 +03:00 committed by Marco Costalba
parent 71ba48c4ff
commit d3260ce70f
2 changed files with 4 additions and 9 deletions

View file

@ -1752,21 +1752,17 @@ void Position::init_zobrist() {
/// Position::init_piece_square_tables() initializes the piece square tables.
/// This is a two-step operation: First, the white halves of the tables are
/// copied from the MgPST[][] and EgPST[][] arrays, with a small random number
/// added to each entry if the "Randomness" UCI parameter is non-zero.
/// This is a two-step operation:
/// First, the white halves of the tables are
/// copied from the MgPST[][] and EgPST[][] arrays.
/// Second, the black halves of the tables are initialized by mirroring
/// and changing the sign of the corresponding white scores.
void Position::init_piece_square_tables() {
int r = get_option_value_int("Randomness"), i;
for (Square s = SQ_A1; s <= SQ_H8; s++)
for (Piece p = WP; p <= WK; p++)
{
i = (r == 0)? 0 : (genrand_int32() % (r*2) - r);
PieceSquareTable[p][s] = make_score(MgPST[p][s] + i, EgPST[p][s] + i);
}
PieceSquareTable[p][s] = make_score(MgPST[p][s], EgPST[p][s]);
for (Square s = SQ_A1; s <= SQ_H8; s++)
for (Piece p = BP; p <= BK; p++)

View file

@ -118,7 +118,6 @@ namespace {
o["Passed Pawn Extension (non-PV nodes)"] = Option(0, 0, 2);
o["Pawn Endgame Extension (PV nodes)"] = Option(2, 0, 2);
o["Pawn Endgame Extension (non-PV nodes)"] = Option(2, 0, 2);
o["Randomness"] = Option(0, 0, 10);
o["Minimum Split Depth"] = Option(4, 4, 7);
o["Maximum Number of Threads per Split Point"] = Option(5, 4, 8);
o["Threads"] = Option(1, 1, MAX_THREADS);