From: Fabian Fichter Date: Thu, 1 Jul 2021 22:28:57 +0000 (+0200) Subject: Merge official-stockfish/master X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d2b5b55d1e97c4c0bd7b69a5755894379a0c1774;p=fairystockfish.git Merge official-stockfish/master bench: 4835554 --- d2b5b55d1e97c4c0bd7b69a5755894379a0c1774 diff --cc AUTHORS index c20626d,9042495..28979a7 --- a/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 index 23a64ef,660a13f..8d3dc98 --- a/src/Makefile +++ b/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 ### ========================================================================== diff --cc src/evaluate.cpp index af810e0,403d59d..7db474b --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@@ -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/search.cpp index 299de9e,29b334e..04fcdeb --- a/src/search.cpp +++ b/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) @@@ -1387,34 -1168,15 +1316,15 @@@ 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 @@@ -1768,14 -1524,14 +1678,14 @@@ 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