]> git.sesse.net Git - stockfish/commit
Clarify the mapping of files to queenside
authorStéphane Nicolet <cassio@free.fr>
Mon, 23 Sep 2019 06:52:27 +0000 (08:52 +0200)
committerStéphane Nicolet <cassio@free.fr>
Mon, 23 Sep 2019 06:54:20 +0000 (08:54 +0200)
commit7756344d5d2b93970e7cd423f8cbf6fb1da11b74
tree894ec292b439ab444dbc59556f0d427857618b65
parent770c8d92f3886d11ae88afef13f6552f9132a714
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
src/evaluate.cpp
src/pawns.cpp
src/psqt.cpp
src/types.h