1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Small cleanups

remove some unneeded assignments, typos, incorrect comments, add authors entry.

closes https://github.com/official-stockfish/Stockfish/pull/4417

no functional change
This commit is contained in:
pb00067 2023-03-01 10:29:51 +01:00 committed by Joost VandeVondele
parent 7077fbdd14
commit f0556dcbe3
4 changed files with 2 additions and 6 deletions

View file

@ -190,6 +190,7 @@ Sergei Antonov (saproj)
Sergei Ivanov (svivanov72) Sergei Ivanov (svivanov72)
Sergio Vieri (sergiovieri) Sergio Vieri (sergiovieri)
sf-x sf-x
Shahin M. Shahin (peregrine)
Shane Booth (shane31) Shane Booth (shane31)
Shawn Varghese (xXH4CKST3RXx) Shawn Varghese (xXH4CKST3RXx)
Siad Daboul (Topologist) Siad Daboul (Topologist)

View file

@ -363,7 +363,7 @@ namespace Stockfish::Eval::NNUE {
// NOTE: The parameter states_to_update is an array of position states, ending with nullptr. // NOTE: The parameter states_to_update is an array of position states, ending with nullptr.
// All states must be sequential, that is states_to_update[i] must either be reachable // All states must be sequential, that is states_to_update[i] must either be reachable
// by repeatedly applying ->previous from states_to_update[i+1] or states_to_update[i] == nullptr. // by repeatedly applying ->previous from states_to_update[i+1] or states_to_update[i] == nullptr.
// computed_st must be reachable by repeatadly applying ->previous on states_to_update[0], if not nullptr. // computed_st must be reachable by repeatedly applying ->previous on states_to_update[0], if not nullptr.
template<Color Perspective, size_t N> template<Color Perspective, size_t N>
void update_accumulator_incremental(const Position& pos, StateInfo* computed_st, StateInfo* states_to_update[N]) const { void update_accumulator_incremental(const Position& pos, StateInfo* computed_st, StateInfo* states_to_update[N]) const {
static_assert(N > 0); static_assert(N > 0);

View file

@ -765,9 +765,6 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
// Update board and piece lists // Update board and piece lists
remove_piece(capsq); remove_piece(capsq);
if (type_of(m) == EN_PASSANT)
board[capsq] = NO_PIECE;
// Update material hash key and prefetch access to materialTable // Update material hash key and prefetch access to materialTable
k ^= Zobrist::psq[captured][capsq]; k ^= Zobrist::psq[captured][capsq];
st->materialKey ^= Zobrist::psq[captured][pieceCount[captured]]; st->materialKey ^= Zobrist::psq[captured][pieceCount[captured]];

View file

@ -601,7 +601,6 @@ namespace {
assert(0 <= ss->ply && ss->ply < MAX_PLY); assert(0 <= ss->ply && ss->ply < MAX_PLY);
(ss+1)->ttPv = false;
(ss+1)->excludedMove = bestMove = MOVE_NONE; (ss+1)->excludedMove = bestMove = MOVE_NONE;
(ss+2)->killers[0] = (ss+2)->killers[1] = MOVE_NONE; (ss+2)->killers[0] = (ss+2)->killers[1] = MOVE_NONE;
(ss+2)->cutoffCnt = 0; (ss+2)->cutoffCnt = 0;
@ -1075,7 +1074,6 @@ moves_loop: // When in check, search starts here
Depth singularDepth = (depth - 1) / 2; Depth singularDepth = (depth - 1) / 2;
ss->excludedMove = move; ss->excludedMove = move;
// the search with excludedMove will update ss->staticEval
value = search<NonPV>(pos, ss, singularBeta - 1, singularBeta, singularDepth, cutNode); value = search<NonPV>(pos, ss, singularBeta - 1, singularBeta, singularDepth, cutNode);
ss->excludedMove = MOVE_NONE; ss->excludedMove = MOVE_NONE;