mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 02:27:00 +08:00
Cleanup comments
Tests used to derive some Elo worth comments: https://tests.stockfishchess.org/tests/view/656a7f4e136acbc573555a31 https://tests.stockfishchess.org/tests/view/6585fb455457644dc984620f closes https://github.com/official-stockfish/Stockfish/pull/4945 No functional change
This commit is contained in:
@@ -747,7 +747,7 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
|
||||
tte->save(posKey, VALUE_NONE, ss->ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval);
|
||||
}
|
||||
|
||||
// Use static evaluation difference to improve quiet move ordering (~4 Elo)
|
||||
// Use static evaluation difference to improve quiet move ordering (~9 Elo)
|
||||
if (is_ok((ss - 1)->currentMove) && !(ss - 1)->inCheck && !priorCapture)
|
||||
{
|
||||
int bonus = std::clamp(-13 * int((ss - 1)->staticEval + ss->staticEval), -1652, 1546);
|
||||
@@ -1201,6 +1201,7 @@ moves_loop: // When in check, search starts here
|
||||
if (newDepth > d)
|
||||
value = -search<NonPV>(pos, ss + 1, -(alpha + 1), -alpha, newDepth, !cutNode);
|
||||
|
||||
// Post LMR continuation history updates (~1 Elo)
|
||||
int bonus = value <= alpha ? -stat_malus(newDepth)
|
||||
: value >= beta ? stat_bonus(newDepth)
|
||||
: 0;
|
||||
@@ -1216,7 +1217,7 @@ moves_loop: // When in check, search starts here
|
||||
if (!ttMove)
|
||||
r += 2;
|
||||
|
||||
// Note that if expected reduction is high, we reduce search depth by 1 here
|
||||
// Note that if expected reduction is high, we reduce search depth by 1 here (~9 Elo)
|
||||
value = -search<NonPV>(pos, ss + 1, -(alpha + 1), -alpha, newDepth - (r > 3), !cutNode);
|
||||
}
|
||||
|
||||
@@ -1644,8 +1645,7 @@ Value value_to_tt(Value v, int ply) {
|
||||
// from the transposition table (which refers to the plies to mate/be mated from
|
||||
// current position) to "plies to mate/be mated (TB win/loss) from the root".
|
||||
// However, to avoid potentially false mate or TB scores related to the 50 moves rule
|
||||
// and the graph history interaction, we return highest non-TB score instead.
|
||||
|
||||
// and the graph history interaction, we return the highest non-TB score instead.
|
||||
Value value_from_tt(Value v, int ply, int r50c) {
|
||||
|
||||
if (v == VALUE_NONE)
|
||||
|
||||
Reference in New Issue
Block a user