Skip to content

Commit f10498b

Browse files
committed
Revert 5 patches
Bench: 5153165
1 parent 3b70932 commit f10498b

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
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: 6 additions & 10 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,7 +1608,7 @@ 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
1611+
bonus2 = bestValue > beta + PawnValueMg ? bonus1 // larger bonus
16161612
: stat_bonus(depth); // smaller bonus
16171613

16181614
if (!pos.capture_or_promotion(bestMove))

0 commit comments

Comments
 (0)