From: Joona Kiiski Date: Fri, 23 Jul 2010 06:08:31 +0000 (+0300) Subject: Retire 'Randomness' ucioption X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=d3260ce70f6a17f9d43d199f0e07488888188f8b 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 --- diff --git a/src/position.cpp b/src/position.cpp index 17680697..537e574f 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -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++) diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 84bcc832..6fdc6e77 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -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);