mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Update NNUE architecture to SFNNv14 and net nn-7bf13f9655c8.nnue
[STC](https://tests.stockfishchess.org/tests/live_elo/69cb991bc025c305b7daa219) LLR: 2.97 (-2.94,2.94) <0.00,2.00> Total: 47520 W: 12558 L: 12219 D: 22743 Ptnml(0-2): 190, 5474, 12102, 5795, 199 [LTC](https://tests.stockfishchess.org/tests/live_elo/69cc6b42731dfb72d2e92128) LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 123756 W: 31996 L: 31497 D: 60263 Ptnml(0-2): 81, 13512, 34221, 13955, 109 Adds features for pawns pushing against other pawns. For indexing, we use the existing threats feature set by adding the forward square to the squares threatened by a pawn. This threat is only enabled when another pawn occupies that square. We then add appropriate logic changes in `update_piece_threats` and `features/full_threats.cpp`. The wonderful Ciekce (of Stormphrax) and peregrine (of Reckless) also had similar ideas with adding forward pawn movements to TI, and I appreciate their giving me motivation to figure out `nnue-pytorch` and test it. closes https://github.com/official-stockfish/Stockfish/pull/6694 Bench: 2926703
This commit is contained in:
+19
-2
@@ -1265,8 +1265,25 @@ void Position::update_piece_threats(Piece pc,
|
||||
|
||||
Bitboard threatened = attacks_bb(pc, s, occupied) & occupiedNoK;
|
||||
Bitboard incoming_threats =
|
||||
(PseudoAttacks[KNIGHT][s] & knights) | (attacks_bb<PAWN>(s, WHITE) & blackPawns)
|
||||
| (attacks_bb<PAWN>(s, BLACK) & whitePawns) | (PseudoAttacks[KING][s] & kings);
|
||||
(PseudoAttacks[KNIGHT][s] & knights) | (PseudoAttacks[KING][s] & kings);
|
||||
|
||||
// Compute both incoming and outgoing pawn threats. Incoming pawn pushers are only
|
||||
// added if 'pc' is a pawn.
|
||||
if (type_of(pc) == PAWN)
|
||||
{
|
||||
Bitboard whiteAttacks = PawnPushOrAttacks[WHITE][s];
|
||||
Bitboard blackAttacks = PawnPushOrAttacks[BLACK][s];
|
||||
|
||||
threatened |= (color_of(pc) == WHITE ? whiteAttacks : blackAttacks) & pieces(PAWN);
|
||||
|
||||
incoming_threats |= whiteAttacks & blackPawns;
|
||||
incoming_threats |= blackAttacks & whitePawns;
|
||||
}
|
||||
else
|
||||
{
|
||||
incoming_threats |=
|
||||
(attacks_bb<PAWN>(s, WHITE) & blackPawns) | (attacks_bb<PAWN>(s, BLACK) & whitePawns);
|
||||
}
|
||||
|
||||
#ifdef USE_AVX512ICL
|
||||
if constexpr (PutPiece)
|
||||
|
||||
Reference in New Issue
Block a user