Simplify the ShelterStrength[] array
authorStéphane Nicolet <cassio@free.fr>
Mon, 23 Apr 2018 07:48:53 +0000 (09:48 +0200)
committerStéphane Nicolet <cassio@free.fr>
Mon, 23 Apr 2018 07:49:05 +0000 (09:49 +0200)
commitc794c8c8016dfdc8360c9d5ab74dffa9d93d9277
tree5daca88f33ae3f13ccf131eaa4bd7d355858c867
parentaef7076c344881954b4f586bd4779594d0b29037
Simplify the ShelterStrength[] array

Remove the distinction between the king file and the two neighbours
files in the ShelterStrength[] array. Instead we initialize the safety
variable in the evaluate_shelter() function with a -10 penalty if our
king is on a semi-open file (ie. if our king is on a file without a pawn
protection).

Also rename shelter_storm() to evaluate_shelter() while there.

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 23153 W: 4795 L: 4677 D: 13681
http://tests.stockfishchess.org/tests/view/5adcb83d0ebc595ec7ff8aa7

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 25728 W: 3934 L: 3821 D: 17973
http://tests.stockfishchess.org/tests/view/5adcdcb60ebc595ec7ff8adb

See the commit history in PR#1559 for the proof that the committed
version is equivalent to the version in the tests above:
https://github.com/official-stockfish/Stockfish/pull/1559

Full credit to @protonspring for the renormalized values of the
ShelterStrength[] array used for the simplification. Thanks!

Bench: 4703935
src/pawns.cpp
src/pawns.h