Remove openFiles in pawns. (#1917)

A single popcount in evaluate.cpp replaces all openFiles stuff in pawns. It doesn't seem to affect performance at all.

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 28103 W: 6134 L: 6025 D: 15944
http://tests.stockfishchess.org/tests/view/5b7d70a20ebc5902bdbb1999

No functional change.
This commit is contained in:
protonspring
2019-01-01 05:38:09 -07:00
committed by Marco Costalba
parent 7accf07c0b
commit 79c97625a4
3 changed files with 2 additions and 4 deletions

View File

@@ -717,7 +717,8 @@ namespace {
behind |= (Us == WHITE ? behind >> 16 : behind << 16);
int bonus = popcount(safe) + popcount(behind & safe);
int weight = pos.count<ALL_PIECES>(Us) - 2 * pe->open_files();
int weight = pos.count<ALL_PIECES>(Us)
- 2 * popcount(pe->semiopenFiles[WHITE] & pe->semiopenFiles[BLACK]);
Score score = make_score(bonus * weight * weight / 16, 0);