Merge official-stockfish/master
authorFabian Fichter <ianfab@users.noreply.github.com>
Thu, 1 Jul 2021 22:28:57 +0000 (00:28 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Thu, 1 Jul 2021 22:31:33 +0000 (00:31 +0200)
bench: 4835554

1  2 
AUTHORS
src/Makefile
src/evaluate.cpp
src/misc.cpp
src/position.cpp
src/search.cpp
src/thread.h

diff --cc AUTHORS
+++ b/AUTHORS
@@@ -1,21 -1,4 +1,21 @@@
 +# Fairy-Stockfish authors
 +
 +# Main author
 +Fabian Fichter (ianfab)
 +
 +# Contributors in alphabetical order
 +alwey
 +Belzedar94
 +Fulmene
 +gbtami
 +QueensGambit
 +tttak
 +yoav-rozin
 +ydirson
 +
 +
 +
- # List of authors for Stockfish, as of March 31, 2021
+ # List of authors for Stockfish, as of May 17, 2021
  
  # Founders of the Stockfish project and fishtest infrastructure
  Tord Romstad (romstad)
diff --cc src/Makefile
@@@ -298,13 -291,19 +298,24 @@@ ifeq ($(ARCH),ppc-64
        prefetch = yes
  endif
  
+ ifeq ($(findstring e2k,$(ARCH)),e2k)
+       arch = e2k
+       mmx = yes
+       bits = 64
+       sse = yes
+       sse2 = yes
+       ssse3 = yes
+       sse41 = yes
+       popcnt = yes
+ endif
  endif
  
 +# Disable precomputed magics when 64-bit PEXT is available
 +ifeq ($(pext),yes)
 +      precomputedmagics = no
 +endif
 +
  ### ==========================================================================
  ### Section 3. Low-level Configuration
  ### ==========================================================================
@@@ -1397,8 -931,8 +1401,8 @@@ namespace 
      Color strongSide = eg > VALUE_DRAW ? WHITE : BLACK;
      int sf = me->scale_factor(pos, strongSide);
  
-     // If scale factor is not already specific, scale down via general heuristics
+     // If scale factor is not already specific, scale up/down via general heuristics
 -    if (sf == SCALE_FACTOR_NORMAL)
 +    if (sf == SCALE_FACTOR_NORMAL && !pos.captures_to_hand() && !pos.material_counting())
      {
          if (pos.opposite_bishops())
          {
diff --cc src/misc.cpp
Simple merge
Simple merge
diff --cc src/search.cpp
@@@ -1026,9 -845,9 +983,9 @@@ namespace 
          }
      }
  
 -    probCutBeta = beta + 209 - 44 * improving;
 +    probCutBeta = beta + (209 + 20 * !!pos.capture_the_flag_piece() + 50 * pos.captures_to_hand()) * (1 + pos.check_counting() + pos.extinction_single_piece()) - 44 * improving;
  
-     // Step 9. ProbCut (~10 Elo)
+     // Step 9. ProbCut (~4 Elo)
      // If we have a good enough capture and a reduced search returns a value
      // much above beta, we can (almost) safely prune the previous move.
      if (   !PvNode
@@@ -1222,10 -1024,10 +1166,10 @@@ moves_loop: // When in check, search st
            }
            else
            {
-               // Countermoves based pruning (~20 Elo)
-               if (   lmrDepth < 4 + ((ss-1)->statScore > 0 || (ss-1)->moveCount == 1)
+               // Continuation history based pruning (~20 Elo)
+               if (   lmrDepth < 4
 -                  && (*contHist[0])[movedPiece][to_sq(move)] < CounterMovePruneThreshold
 -                  && (*contHist[1])[movedPiece][to_sq(move)] < CounterMovePruneThreshold)
 +                  && (*contHist[0])[history_slot(movedPiece)][to_sq(move)] < CounterMovePruneThreshold
 +                  && (*contHist[1])[history_slot(movedPiece)][to_sq(move)] < CounterMovePruneThreshold)
                    continue;
  
                // Futility pruning: parent node (~5 Elo)
                if (cutNode)
                    r += 2;
  
-               // Decrease reduction for moves that escape a capture. Filter out
-               // castling moves, because they are coded as "king captures rook" and
-               // hence break reverse_move() (~2 Elo)
-               else if (    type_of(move) == NORMAL
-                        && !pos.see_ge(reverse_move(move)))
-                   r -= 2 + ss->ttPv - (type_of(movedPiece) == PAWN);
                ss->statScore =  thisThread->mainHistory[us][from_to(move)]
 -                             + (*contHist[0])[movedPiece][to_sq(move)]
 -                             + (*contHist[1])[movedPiece][to_sq(move)]
 -                             + (*contHist[3])[movedPiece][to_sq(move)]
 +                             + (*contHist[0])[history_slot(movedPiece)][to_sq(move)]
 +                             + (*contHist[1])[history_slot(movedPiece)][to_sq(move)]
 +                             + (*contHist[3])[history_slot(movedPiece)][to_sq(move)]
                               - 4741;
  
-               // Decrease/increase reduction by comparing opponent's stat score (~10 Elo)
-               if (ss->statScore >= -89 && (ss-1)->statScore < -116)
-                   r--;
-               else if ((ss-1)->statScore >= -112 && ss->statScore < -100)
-                   r++;
                // Decrease/increase reduction for moves with a good/bad history (~30 Elo)
-               // If we are not in check use statScore, but if we are in check we use
-               // the sum of main history and first continuation history with an offset.
-               if (ss->inCheck)
-                   r -= (thisThread->mainHistory[us][from_to(move)]
-                      + (*contHist[0])[history_slot(movedPiece)][to_sq(move)] - 3833) / 16384;
-               else
+               if (!ss->inCheck)
 -                  r -= ss->statScore / 14790;
 +                  r -= ss->statScore / (14790 - 4434 * pos.captures_to_hand());
            }
  
            // In general we want to cap the LMR depth search at newDepth. But if
        ss->currentMove = move;
        ss->continuationHistory = &thisThread->continuationHistory[ss->inCheck]
                                                                  [captureOrPromotion]
 -                                                                [pos.moved_piece(move)]
 +                                                                [history_slot(pos.moved_piece(move))]
                                                                  [to_sq(move)];
  
-       // CounterMove based pruning
+       // Continuation history based pruning
        if (  !captureOrPromotion
            && bestValue > VALUE_TB_LOSS_IN_MAX_PLY
 -          && (*contHist[0])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold
 -          && (*contHist[1])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold)
 +          && (*contHist[0])[history_slot(pos.moved_piece(move))][to_sq(move)] < CounterMovePruneThreshold
 +          && (*contHist[1])[history_slot(pos.moved_piece(move))][to_sq(move)] < CounterMovePruneThreshold)
            continue;
  
        // Make and search the move
diff --cc src/thread.h
Simple merge