mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 07:27:46 +00:00
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:
committed by
Marco Costalba
parent
7accf07c0b
commit
79c97625a4
+2
-1
@@ -717,7 +717,8 @@ namespace {
|
|||||||
behind |= (Us == WHITE ? behind >> 16 : behind << 16);
|
behind |= (Us == WHITE ? behind >> 16 : behind << 16);
|
||||||
|
|
||||||
int bonus = popcount(safe) + popcount(behind & safe);
|
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);
|
Score score = make_score(bonus * weight * weight / 16, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ Entry* probe(const Position& pos) {
|
|||||||
e->key = key;
|
e->key = key;
|
||||||
e->scores[WHITE] = evaluate<WHITE>(pos, e);
|
e->scores[WHITE] = evaluate<WHITE>(pos, e);
|
||||||
e->scores[BLACK] = evaluate<BLACK>(pos, e);
|
e->scores[BLACK] = evaluate<BLACK>(pos, e);
|
||||||
e->openFiles = popcount(e->semiopenFiles[WHITE] & e->semiopenFiles[BLACK]);
|
|
||||||
e->asymmetry = popcount( (e->passedPawns[WHITE] | e->passedPawns[BLACK])
|
e->asymmetry = popcount( (e->passedPawns[WHITE] | e->passedPawns[BLACK])
|
||||||
| (e->semiopenFiles[WHITE] ^ e->semiopenFiles[BLACK]));
|
| (e->semiopenFiles[WHITE] ^ e->semiopenFiles[BLACK]));
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ struct Entry {
|
|||||||
Bitboard pawn_attacks_span(Color c) const { return pawnAttacksSpan[c]; }
|
Bitboard pawn_attacks_span(Color c) const { return pawnAttacksSpan[c]; }
|
||||||
int weak_unopposed(Color c) const { return weakUnopposed[c]; }
|
int weak_unopposed(Color c) const { return weakUnopposed[c]; }
|
||||||
int pawn_asymmetry() const { return asymmetry; }
|
int pawn_asymmetry() const { return asymmetry; }
|
||||||
int open_files() const { return openFiles; }
|
|
||||||
|
|
||||||
int semiopen_file(Color c, File f) const {
|
int semiopen_file(Color c, File f) const {
|
||||||
return semiopenFiles[c] & (1 << f);
|
return semiopenFiles[c] & (1 << f);
|
||||||
@@ -73,7 +72,6 @@ struct Entry {
|
|||||||
int semiopenFiles[COLOR_NB];
|
int semiopenFiles[COLOR_NB];
|
||||||
int pawnsOnSquares[COLOR_NB][COLOR_NB]; // [color][light/dark squares]
|
int pawnsOnSquares[COLOR_NB][COLOR_NB]; // [color][light/dark squares]
|
||||||
int asymmetry;
|
int asymmetry;
|
||||||
int openFiles;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HashTable<Entry, 16384> Table;
|
typedef HashTable<Entry, 16384> Table;
|
||||||
|
|||||||
Reference in New Issue
Block a user