Skip to content

Commit 6ccb1ca

Browse files
committed
Revert 5 recent patches
Revert 5 patches which were merged, but lead to a regression test that showed negative Elo gain: http://tests.stockfishchess.org/tests/view/5e307251ab2d69d58394fdb9 This was discussed in depth in: #2531 Each patch was removed and tested as a simplification, full list below, and the whole combo as well. After the revert the regression test showed a neutral result: http://tests.stockfishchess.org/tests/view/5e334851708b13464ceea33c As a result of this experience, the SPRT testing bounds will be made more strict. Reverted patches: 1 Dynamic Complexity 6d0eabd : STC 10+0.1 https://tests.stockfishchess.org/tests/view/5e31fcacec661e2e6a340d08 : LLR: 2.97 (-2.94,2.94) {-1.50,0.50} Total: 38130 W: 7326 L: 7189 D: 23615 Ptnml(0-2): 677, 4346, 8843, 4545, 646 LTC 60+0.6 https://tests.stockfishchess.org/tests/view/5e32c18fec661e2e6a340d73 : LLR: 2.94 (-2.94,2.94) {-1.50,0.50} Total: 38675 W: 4941 L: 4866 D: 28868 Ptnml(0-2): 270, 3556, 11429, 3584, 291 3 More bonus for bestMoves on past PV nodes 71e0b53 : STC 10+0.1 https://tests.stockfishchess.org/tests/view/5e31fe93ec661e2e6a340d10 : LLR: 2.95 (-2.94,2.94) {-1.50,0.50} Total: 46100 W: 8853 L: 8727 D: 28520 Ptnml(0-2): 796, 5297, 10749, 5387, 813 LTC 60+0.6 https://tests.stockfishchess.org/tests/view/5e32c187ec661e2e6a340d71 : LLR: 2.96 (-2.94,2.94) {-1.50,0.50} Total: 16920 W: 2161 L: 2055 D: 12704 Ptnml(0-2): 115, 1498, 5006, 1569, 130 4 Tweak Restricted Piece Bonus 0ae0045 : STC 10+0.1 https://tests.stockfishchess.org/tests/view/5e31fefaec661e2e6a340d15 : LLR: 2.94 (-2.94,2.94) {-1.50,0.50} Total: 88328 W: 17060 L: 16997 D: 54271 Ptnml(0-2): 1536, 10446, 20169, 10422, 1581 LTC 60+0.6 https://tests.stockfishchess.org/tests/view/5e32c17aec661e2e6a340d6f : LLR: 2.95 (-2.94,2.94) {-1.50,0.50} Total: 34784 W: 4551 L: 4466 D: 25767 Ptnml(0-2): 255, 3279, 10061, 3345, 262 5 History update for pruned captures 01b6088 : STC 10+0.1 https://tests.stockfishchess.org/tests/view/5e31ff5eec661e2e6a340d1a : LLR: 2.94 (-2.94,2.94) {-1.50,0.50} Total: 29541 W: 5735 L: 5588 D: 18218 Ptnml(0-2): 483, 3445, 6820, 3469, 545 LTC 60+0.6 https://tests.stockfishchess.org/tests/view/5e32c196ec661e2e6a340d75 : LLR: 2.94 (-2.94,2.94) {-1.50,0.50} Total: 22177 W: 2854 L: 2757 D: 16566 Ptnml(0-2): 143, 2005, 6555, 2055, 164 6 Tweak trapped rook penalty 18fc21e : STC 10+0.1 https://tests.stockfishchess.org/tests/view/5e31ffb1ec661e2e6a340d1c : LLR: 2.95 (-2.94,2.94) {-1.50,0.50} Total: 24476 W: 4727 L: 4569 D: 15180 Ptnml(0-2): 390, 2834, 5659, 2933, 417 LTC 60+0.6 https://tests.stockfishchess.org/tests/view/5e32c19eec661e2e6a340d77 : LLR: 2.95 (-2.94,2.94) {-1.50,0.50} Total: 97332 W: 12492 L: 12466 D: 72374 Ptnml(0-2): 690, 9107, 28738, 9034, 720 All 5 as one simplification : LTC 60+0.6 https://tests.stockfishchess.org/tests/view/5e334098708b13464ceea330 : LLR: 2.94 (-2.94,2.94) {-1.50,0.50} Total: 7829 W: 1079 L: 964 D: 5786 Ptnml(0-2): 52, 690, 2281, 781, 65 Bench: 5153165
1 parent 3b70932 commit 6ccb1ca

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/evaluate.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ namespace {
145145
constexpr Score ThreatByKing = S( 24, 89);
146146
constexpr Score ThreatByPawnPush = S( 48, 39);
147147
constexpr Score ThreatBySafePawn = S(173, 94);
148-
constexpr Score TrappedRook = S( 52, 30);
148+
constexpr Score TrappedRook = S( 52, 10);
149149
constexpr Score WeakQueen = S( 49, 15);
150150

151151
#undef S
@@ -524,7 +524,7 @@ namespace {
524524
b = attackedBy[Them][ALL_PIECES]
525525
& ~stronglyProtected
526526
& attackedBy[Us][ALL_PIECES];
527-
score += RestrictedPiece * (popcount(b) + popcount(b & pos.pieces()));
527+
score += RestrictedPiece * popcount(b);
528528

529529
// Protected or unattacked squares
530530
safe = ~attackedBy[Them][ALL_PIECES] | attackedBy[Us][ALL_PIECES];
@@ -722,7 +722,6 @@ namespace {
722722
- 100 ;
723723

724724
// Give more importance to non-material score
725-
score = score - pos.psq_score() / 2;
726725
Value mg = mg_value(score);
727726
Value eg = eg_value(score);
728727

src/search.cpp

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ namespace {
158158
void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus);
159159
void update_quiet_stats(const Position& pos, Stack* ss, Move move, int bonus);
160160
void update_all_stats(const Position& pos, Stack* ss, Move bestMove, Value bestValue, Value beta, Square prevSq,
161-
Move* quietsSearched, int quietCount, Move* capturesSearched, int captureCount, Depth depth, bool pastPV);
161+
Move* quietsSearched, int quietCount, Move* capturesSearched, int captureCount, Depth depth);
162162

163163
// perft() is our utility to verify move generation. All the leaf nodes up
164164
// to the given depth are generated and counted, and the sum is returned.
@@ -713,7 +713,7 @@ namespace {
713713
if (ttValue >= beta)
714714
{
715715
if (!pos.capture_or_promotion(ttMove))
716-
update_quiet_stats(pos, ss, ttMove, stat_bonus(depth + (!PvNode && ttPv)));
716+
update_quiet_stats(pos, ss, ttMove, stat_bonus(depth));
717717

718718
// Extra penalty for early quiet moves of the previous ply
719719
if ((ss-1)->moveCount <= 2 && !priorCapture)
@@ -722,7 +722,7 @@ namespace {
722722
// Penalty for a quiet ttMove that fails low
723723
else if (!pos.capture_or_promotion(ttMove))
724724
{
725-
int penalty = -stat_bonus(depth + (!PvNode && ttPv));
725+
int penalty = -stat_bonus(depth);
726726
thisThread->mainHistory[us][from_to(ttMove)] << penalty;
727727
update_continuation_histories(ss, pos.moved_piece(ttMove), to_sq(ttMove), penalty);
728728
}
@@ -1028,11 +1028,7 @@ namespace {
10281028
continue;
10291029
}
10301030
else if (!pos.see_ge(move, Value(-194) * depth)) // (~25 Elo)
1031-
{
1032-
if (captureOrPromotion && captureCount < 32)
1033-
capturesSearched[captureCount++] = move;
10341031
continue;
1035-
}
10361032
}
10371033

10381034
// Step 14. Extensions (~75 Elo)
@@ -1326,7 +1322,7 @@ namespace {
13261322

13271323
else if (bestMove)
13281324
update_all_stats(pos, ss, bestMove, bestValue, beta, prevSq,
1329-
quietsSearched, quietCount, capturesSearched, captureCount, depth, (!PvNode && ttPv));
1325+
quietsSearched, quietCount, capturesSearched, captureCount, depth);
13301326

13311327
// Bonus for prior countermove that caused the fail low
13321328
else if ( (depth >= 3 || PvNode)
@@ -1602,7 +1598,7 @@ namespace {
16021598
// update_all_stats() updates stats at the end of search() when a bestMove is found
16031599

16041600
void update_all_stats(const Position& pos, Stack* ss, Move bestMove, Value bestValue, Value beta, Square prevSq,
1605-
Move* quietsSearched, int quietCount, Move* capturesSearched, int captureCount, Depth depth, bool pastPV) {
1601+
Move* quietsSearched, int quietCount, Move* capturesSearched, int captureCount, Depth depth) {
16061602

16071603
int bonus1, bonus2;
16081604
Color us = pos.side_to_move();
@@ -1612,8 +1608,8 @@ namespace {
16121608
PieceType captured = type_of(pos.piece_on(to_sq(bestMove)));
16131609

16141610
bonus1 = stat_bonus(depth + 1);
1615-
bonus2 = pastPV || bestValue > beta + PawnValueMg ? bonus1 // larger bonus
1616-
: stat_bonus(depth); // smaller bonus
1611+
bonus2 = bestValue > beta + PawnValueMg ? bonus1 // larger bonus
1612+
: stat_bonus(depth); // smaller bonus
16171613

16181614
if (!pos.capture_or_promotion(bestMove))
16191615
{

0 commit comments

Comments
 (0)