mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08: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:
committed by
Marco Costalba
parent
71ba48c4ff
commit
d3260ce70f
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user