]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Remove recaptures stage in qsearch
[stockfish] / src / movepick.h
index 9f18997406fe63c24dcb06eb9a0a136749d7e9a5..7828fa19d975fb9f5e12f4e8a652d487037e6804 100644 (file)
@@ -58,7 +58,7 @@ class StatsEntry {
         assert(abs(bonus) <= D);  // Ensure range is [-D, D]
         static_assert(D <= std::numeric_limits<T>::max(), "D overflows T");
 
-        entry += (bonus * D - entry * abs(bonus)) / (D * 5 / 4);
+        entry += bonus - entry * abs(bonus) / D;
 
         assert(abs(entry) <= D);
     }
@@ -96,11 +96,10 @@ enum StatsType {
     Captures
 };
 
-// ButterflyHistory records how often quiet moves have been successful or
-// unsuccessful during the current search, and is used for reduction and move
-// ordering decisions. It uses 2 tables (one for each color) indexed by
-// the move's from and to squares, see www.chessprogramming.org/Butterfly_Boards
-// (~11 elo)
+// ButterflyHistory records how often quiet moves have been successful or unsuccessful
+// during the current search, and is used for reduction and move ordering decisions.
+// It uses 2 tables (one for each color) indexed by the move's from and to squares,
+// see www.chessprogramming.org/Butterfly_Boards (~11 elo)
 using ButterflyHistory = Stats<int16_t, 7183, COLOR_NB, int(SQUARE_NB) * int(SQUARE_NB)>;
 
 // CounterMoveHistory stores counter moves indexed by [piece][to] of the previous
@@ -153,8 +152,7 @@ class MovePicker {
                const ButterflyHistory*,
                const CapturePieceToHistory*,
                const PieceToHistory**,
-               const PawnHistory*,
-               Square);
+               const PawnHistory*);
     MovePicker(const Position&, Move, Value, const CapturePieceToHistory*);
     Move next_move(bool skipQuiets = false);
 
@@ -174,7 +172,6 @@ class MovePicker {
     Move                         ttMove;
     ExtMove                      refutations[3], *cur, *endMoves, *endBadCaptures;
     int                          stage;
-    Square                       recaptureSquare;
     Value                        threshold;
     Depth                        depth;
     ExtMove                      moves[MAX_MOVES];