mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Clarify the mapping of files to queenside
Author: @nickpelling We replace in the code the obscure expressions mapping files ABCDEFGH to ABCDDCBA by an explicite call to an auxiliary function : old: f = min(f, ~f) new: f = map_to_queenside(f) We used the Golbolt web site (https://godbolt.org) to find the optimal code for the auxiliary function. STC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 30292 W: 6756 L: 6651 D: 16885 http://tests.stockfishchess.org/tests/view/5d8676720ebc5971531d6aa1 No functional change
This commit is contained in:
@@ -662,7 +662,7 @@ namespace {
|
||||
|| (pos.pieces(PAWN) & (s + Up)))
|
||||
bonus = bonus / 2;
|
||||
|
||||
score += bonus - PassedFile * std::min(f, ~f);
|
||||
score += bonus - PassedFile * map_to_queenside(f);
|
||||
}
|
||||
|
||||
if (T)
|
||||
|
||||
Reference in New Issue
Block a user