Skip to content

Commit

Permalink
Simplify Probcut Malus
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-shawn authored and PikaCat-OuO committed Jul 11, 2024
1 parent e206a28 commit f648b30
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,6 @@ Value Search::Worker::search(
assert(probCutBeta < VALUE_INFINITE && probCutBeta > beta);

MovePicker mp(pos, ttData.move, probCutBeta - ss->staticEval, &thisThread->captureHistory);
Move probcutCapturesSearched[32];
int probcutCaptureCount = 0;
Piece captured;

while ((move = mp.next_move()) != Move::none())
Expand Down Expand Up @@ -784,25 +782,12 @@ Value Search::Worker::search(
thisThread->captureHistory[movedPiece][move.to_sq()][type_of(captured)]
<< stat_bonus(depth - 2);

for (int i = 0; i < probcutCaptureCount; i++)
{
movedPiece = pos.moved_piece(probcutCapturesSearched[i]);
captured = pos.piece_on(probcutCapturesSearched[i].to_sq());

thisThread->captureHistory[movedPiece][probcutCapturesSearched[i].to_sq()]
[type_of(captured)]
<< -stat_malus(depth - 3);
}

// Save ProbCut data into transposition table
ttWriter.write(posKey, value_to_tt(value, ss->ply), ss->ttPv, BOUND_LOWER,
depth - 3, move, unadjustedStaticEval, tt.generation());
return std::abs(value) < VALUE_MATE_IN_MAX_PLY ? value - (probCutBeta - beta)
: value;
}

if (probcutCaptureCount < 32)
probcutCapturesSearched[probcutCaptureCount++] = move;
}

Eval::NNUE::hint_common_parent_position(pos, network[numaAccessToken], refreshTable);
Expand Down

0 comments on commit f648b30

Please sign in to comment.