]> git.sesse.net Git - stockfish/commitdiff
Retire 'Randomness' ucioption
authorJoona Kiiski <joona.kiiski@gmail.com>
Fri, 23 Jul 2010 06:08:31 +0000 (09:08 +0300)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 23 Jul 2010 11:21:46 +0000 (12:21 +0100)
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>
src/position.cpp
src/ucioption.cpp

index 176806976bb4234105d25826a973097537984b4a..537e574f51e4bc723cd85a3a50545de216f88b22 100644 (file)
@@ -1752,21 +1752,17 @@ void Position::init_zobrist() {
 
 
 /// Position::init_piece_square_tables() initializes the piece square tables.
 
 
 /// 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() {
 
 /// 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++)
   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++)
 
   for (Square s = SQ_A1; s <= SQ_H8; s++)
       for (Piece p = BP; p <= BK; p++)
index 84bcc832fad496bce50ba8e13b38e870799f9ec6..6fdc6e77a1b22f2eccc9128d61a597ede0f23bde 100644 (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["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);
     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);