mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 08:37:44 +00:00
Sync with master
bench: 8285241
This commit is contained in:
+4
-4
@@ -294,14 +294,14 @@ Score Entry::do_king_safety(const Position& pos, Square ksq) {
|
|||||||
|
|
||||||
kingSquares[Us] = ksq;
|
kingSquares[Us] = ksq;
|
||||||
castlingRights[Us] = pos.can_castle(Us);
|
castlingRights[Us] = pos.can_castle(Us);
|
||||||
minKingPawnDistance[Us] = 0;
|
int minKingPawnDistance = 0;
|
||||||
|
|
||||||
Bitboard pawns = pos.pieces(Us, PAWN);
|
Bitboard pawns = pos.pieces(Us, PAWN);
|
||||||
if (pawns)
|
if (pawns)
|
||||||
while (!(DistanceRingBB[ksq][minKingPawnDistance[Us]++] & pawns)) {}
|
while (!(DistanceRingBB[ksq][minKingPawnDistance++] & pawns)) {}
|
||||||
|
|
||||||
if (relative_rank(Us, ksq) > RANK_4)
|
if (relative_rank(Us, ksq) > RANK_4)
|
||||||
return make_score(0, -16 * minKingPawnDistance[Us]);
|
return make_score(0, -16 * minKingPawnDistance);
|
||||||
|
|
||||||
Value bonus = shelter_storm<Us>(pos, ksq);
|
Value bonus = shelter_storm<Us>(pos, ksq);
|
||||||
|
|
||||||
@@ -312,7 +312,7 @@ Score Entry::do_king_safety(const Position& pos, Square ksq) {
|
|||||||
if (pos.can_castle(MakeCastling<Us, QUEEN_SIDE>::right))
|
if (pos.can_castle(MakeCastling<Us, QUEEN_SIDE>::right))
|
||||||
bonus = std::max(bonus, shelter_storm<Us>(pos, relative_square(Us, SQ_C1)));
|
bonus = std::max(bonus, shelter_storm<Us>(pos, relative_square(Us, SQ_C1)));
|
||||||
|
|
||||||
return make_score(bonus, -16 * minKingPawnDistance[Us]);
|
return make_score(bonus, -16 * minKingPawnDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicit template instantiation
|
// Explicit template instantiation
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ struct Entry {
|
|||||||
Bitboard pawnAttacks[COLOR_NB];
|
Bitboard pawnAttacks[COLOR_NB];
|
||||||
Square kingSquares[COLOR_NB];
|
Square kingSquares[COLOR_NB];
|
||||||
Score kingSafety[COLOR_NB];
|
Score kingSafety[COLOR_NB];
|
||||||
int minKingPawnDistance[COLOR_NB];
|
|
||||||
int castlingRights[COLOR_NB];
|
int castlingRights[COLOR_NB];
|
||||||
int semiopenFiles[COLOR_NB];
|
int semiopenFiles[COLOR_NB];
|
||||||
int pawnSpan[COLOR_NB];
|
int pawnSpan[COLOR_NB];
|
||||||
|
|||||||
Reference in New Issue
Block a user