From 2694ef23c3ca66a0a55e467750e79ef2cd5e5315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicolet?= Date: Thu, 28 Apr 2016 18:57:54 +0200 Subject: [PATCH 01/11] Isolated pawn simplification STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 117822 W: 21697 L: 21744 D: 74381 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 92307 W: 12330 L: 12305 D: 67672 Bench: 8813983 Resolves #659 --- src/pawns.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pawns.cpp b/src/pawns.cpp index 86745924..c5c42ff1 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -31,12 +31,8 @@ namespace { #define V Value #define S(mg, eg) make_score(mg, eg) - // Isolated pawn penalty by opposed flag and file - const Score Isolated[2][FILE_NB] = { - { S(31, 36), S(45, 41), S(50, 41), S(50, 41), - S(50, 41), S(50, 41), S(45, 41), S(31, 36) }, - { S(21, 24), S(30, 28), S(33, 28), S(33, 28), - S(33, 28), S(33, 28), S(30, 28), S(21, 24) } }; + // Isolated pawn penalty by opposed flag + const Score Isolated[2] = { S(45, 40), S(30, 27) }; // Backward pawn penalty by opposed flag const Score Backward[2] = { S(56, 33), S(41, 19) }; @@ -161,7 +157,7 @@ namespace { // Score this pawn if (!neighbours) - score -= Isolated[opposed][f]; + score -= Isolated[opposed]; else if (backward) score -= Backward[opposed]; From 8f934dff9a8644c38aaa31fc0ae90c0fab30934a Mon Sep 17 00:00:00 2001 From: Krgp Date: Sat, 30 Apr 2016 16:08:14 +0530 Subject: [PATCH 02/11] Remove useless -mbmi flag in Makefile I could not find anything documented that is necessary that prepending -mbmi to -mbmi2 gives some benefit. Instead at https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html#x86-Built-in-Functions The following built-in functions are available when -mbmi is used. All of them generate the machine instruction that is part of the name. unsigned int __builtin_ia32_bextr_u32(unsigned int, unsigned int); unsigned long long __builtin_ia32_bextr_u64 (unsigned long long, unsigned long long); The following built-in functions are available when -mbmi2 is used. All of them generate the machine instruction that is part of the name. unsigned int _bzhi_u32 (unsigned int, unsigned int) unsigned int _pdep_u32 (unsigned int, unsigned int) unsigned int _pext_u32 (unsigned int, unsigned int) unsigned long long _bzhi_u64 (unsigned long long, unsigned long long) unsigned long long _pdep_u64 (unsigned long long, unsigned long long) unsigned long long _pext_u64 (unsigned long long, unsigned long long) and at https://gcc.gnu.org/ml/gcc/2014-02/msg00204.html ( "... The real optimization comes from being able to use pext (parallel bit extract), which can implement several bextr expressions in parallel.") Apart from that we don't use all -msse -msse2 -msse3 -msse4.2 etc. but just -msse3 (or -msse4.2) only. As regards to the speedup within noise level - this pull request is actually reversal of mcostalba#198 wherein prepending -mbmi to -mbmi2 was claimed to be 0.3% faster and here (removing -mbmi) gives 0.4% speed gain. --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index a7d749a4..cb55c8b0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -309,7 +309,7 @@ endif ifeq ($(pext),yes) CXXFLAGS += -DUSE_PEXT ifeq ($(comp),$(filter $(comp),gcc clang mingw)) - CXXFLAGS += -mbmi -mbmi2 + CXXFLAGS += -mbmi2 endif endif From 2dd24dc4e618dc7b83799890fe7e84b09b6456b4 Mon Sep 17 00:00:00 2001 From: erbsenzaehler Date: Sun, 1 May 2016 10:57:50 +0200 Subject: [PATCH 03/11] Use popcount intrinsic with Interl compiler It seems that icc used our fallback version of popcount. Now use intrinsics. icc version 16.0.2 (gcc version 5.3.0 compatibility) bmi2 compile uname -r 4.5.1-1-ARCH 20xbench gives a nice speedup ./stockfish-icc-master 2161515 +- 34462 ./stockfish-icc-sse42 2260857 +- 50349 --- src/bitboard.h | 2 +- src/types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bitboard.h b/src/bitboard.h index a704edbe..c4fc26e1 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -268,7 +268,7 @@ inline int popcount(Bitboard b) { union { Bitboard bb; uint16_t u[4]; } v = { b }; return PopCnt16[v.u[0]] + PopCnt16[v.u[1]] + PopCnt16[v.u[2]] + PopCnt16[v.u[3]]; -#elif defined(_MSC_VER) && defined(__INTEL_COMPILER) +#elif defined(_MSC_VER) || defined(__INTEL_COMPILER) return _mm_popcnt_u64(b); diff --git a/src/types.h b/src/types.h index 6f62c776..e45d2674 100644 --- a/src/types.h +++ b/src/types.h @@ -64,7 +64,7 @@ # define IS_64BIT #endif -#if defined(USE_POPCNT) && defined(__INTEL_COMPILER) && defined(_MSC_VER) +#if defined(USE_POPCNT) && (defined(__INTEL_COMPILER) || defined(_MSC_VER)) # include // Intel header for _mm_popcnt_u64() intrinsic #endif From dc0030de4fdece2851dd0072c9aea53695ed90ce Mon Sep 17 00:00:00 2001 From: joergoster Date: Sat, 30 Apr 2016 10:56:00 +0200 Subject: [PATCH 04/11] Fix LazySMP when searching to a fixed depth. Currently, helper threads will only search up to the specified depth limit. Now let them search until the main thread has finished the specified depth. On the other hand, we don't want to pick a thread with a higher search depth. This may be considered cheating. ;-) No functional change. --- src/search.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index a50f7990..6b894956 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -350,6 +350,7 @@ void MainThread::search() { Thread* bestThread = this; if ( !this->easyMovePlayed && Options["MultiPV"] == 1 + && !Limits.depth && !Skill(Options["Skill Level"]).enabled() && rootMoves[0].pv[0] != MOVE_NONE) { @@ -411,7 +412,7 @@ void Thread::search() { multiPV = std::min(multiPV, rootMoves.size()); // Iterative deepening loop until requested to stop or the target depth is reached. - while (++rootDepth < DEPTH_MAX && !Signals.stop && (!Limits.depth || rootDepth <= Limits.depth)) + while (++rootDepth < DEPTH_MAX && !Signals.stop && (!Limits.depth || Threads.main()->rootDepth <= Limits.depth)) { // Set up the new depths for the helper threads skipping on average every // 2nd ply (using a half-density matrix). @@ -1006,7 +1007,7 @@ moves_loop: // When in check search starts from here Depth r = reduction(improving, depth, moveCount); Value hValue = thisThread->history[pos.piece_on(to_sq(move))][to_sq(move)]; Value cmhValue = cmh[pos.piece_on(to_sq(move))][to_sq(move)]; - + const CounterMoveStats* fm = (ss - 2)->counterMoves; const CounterMoveStats* fm2 = (ss - 4)->counterMoves; Value fmValue = (fm ? (*fm)[pos.piece_on(to_sq(move))][to_sq(move)] : VALUE_ZERO); From 3487eb9f9ee910ab18d1a5e23f5fc3e507366c09 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 1 May 2016 15:10:33 +0200 Subject: [PATCH 05/11] Fix a warning with MSVC Introduced by 2dd24dc4e618dc7b ("Use popcount intrinsic with Intel") No functional change. --- src/bitboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitboard.h b/src/bitboard.h index c4fc26e1..a0f7ea8d 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -270,7 +270,7 @@ inline int popcount(Bitboard b) { #elif defined(_MSC_VER) || defined(__INTEL_COMPILER) - return _mm_popcnt_u64(b); + return (int)_mm_popcnt_u64(b); #elif defined(_MSC_VER) From 5486911e019c8be689e75462e2fc36ef7eb2c84a Mon Sep 17 00:00:00 2001 From: VoyagerOne Date: Sat, 30 Apr 2016 23:23:15 -0400 Subject: [PATCH 06/11] Simplify History LMR Formula STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 41713 W: 7589 L: 7504 D: 26620 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 41353 W: 5484 L: 5391 D: 30478 Bench: 8946983 --- src/search.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 6b894956..52bb0987 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1013,13 +1013,12 @@ moves_loop: // When in check search starts from here Value fmValue = (fm ? (*fm)[pos.piece_on(to_sq(move))][to_sq(move)] : VALUE_ZERO); Value fm2Value = (fm2 ? (*fm2)[pos.piece_on(to_sq(move))][to_sq(move)] : VALUE_ZERO); - // Increase reduction for cut nodes and moves with a bad history - if ( (!PvNode && cutNode) - || (hValue < VALUE_ZERO && cmhValue <= VALUE_ZERO)) + // Increase reduction for cut nodes + if (!PvNode && cutNode) r += ONE_PLY; // Decrease/increase reduction for moves with a good/bad history - int rHist = (hValue + cmhValue + fmValue + fm2Value) / 20000; + int rHist = (hValue + cmhValue + fmValue + fm2Value - 10000) / 20000; r = std::max(DEPTH_ZERO, r - rHist * ONE_PLY); // Decrease reduction for moves that escape a capture. Filter out From 5e4cd3fc0d4b88eeb09ae458b9cb9f73db8c4ae7 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 1 May 2016 18:18:10 +0200 Subject: [PATCH 07/11] Retire __popcnt64 intrinsic Just use _mm_popcnt_u64() that is available both for MSVC abd Intel compiler. Verified on MSVC that the produced assembly has the hardware 'popcnt' instruction. No functional change. --- src/bitboard.h | 4 ---- src/types.h | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/bitboard.h b/src/bitboard.h index a0f7ea8d..390966e3 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -272,10 +272,6 @@ inline int popcount(Bitboard b) { return (int)_mm_popcnt_u64(b); -#elif defined(_MSC_VER) - - return (int)__popcnt64(b); - #else // Assumed gcc or compatible compiler return __builtin_popcountll(b); diff --git a/src/types.h b/src/types.h index e45d2674..10dfdb07 100644 --- a/src/types.h +++ b/src/types.h @@ -60,12 +60,12 @@ /// _WIN64 Building on Windows 64 bit #if defined(_WIN64) && defined(_MSC_VER) // No Makefile used -# include // MSVC popcnt and bsfq instrinsics +# include // Microsoft header for _BitScanForward64() # define IS_64BIT #endif #if defined(USE_POPCNT) && (defined(__INTEL_COMPILER) || defined(_MSC_VER)) -# include // Intel header for _mm_popcnt_u64() intrinsic +# include // Intel and Microsoft header for _mm_popcnt_u64() #endif #if !defined(NO_PREFETCH) && (defined(__INTEL_COMPILER) || defined(_MSC_VER)) From 4b9ed6566a7ed026160fc79b778f95e62fde22a1 Mon Sep 17 00:00:00 2001 From: Alain SAVARD Date: Fri, 6 May 2016 09:40:56 -0400 Subject: [PATCH 08/11] Unsafe checks Introducing a new multi-purpose penalty related to King safety, which includes all kind of potential checks (from unsafe or unavailable squares currently occupied by some other piece) This will indirectly detect and reward some pins, discovered checks, and motifs such as square vacation, or rook behind its pawn and aligned with King (example Black Rg8, g7 against Kg1), and penalize some pawn blockers (if they move, it allows a discovered check by the pawn). And since it looks also at protected squares, it detects some potential defense overloading. Finally, the rook contact checks had been removed some time ago. This test will give a small bonus for them, as well as for bishop contact checks. Passed STC http://tests.stockfishchess.org/tests/view/5729ec740ebc59301a354b36 LLR: 2.94 (-2.94,2.94) [0.00,5.00] Total: 13306 W: 2477 L: 2296 D: 8533 and LTC http://tests.stockfishchess.org/tests/view/572a5be00ebc59301a354b65 LLR: 2.97 (-2.94,2.94) [0.00,5.00] Total: 20369 W: 2750 L: 2565 D: 15054 bench: 9298175 --- src/evaluate.cpp | 53 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 0f2744d9..4a52e626 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -183,7 +183,8 @@ namespace { const Score BishopPawns = S( 8, 12); const Score RookOnPawn = S( 8, 24); const Score TrappedRook = S(92, 0); - const Score Checked = S(20, 20); + const Score SafeCheck = S(20, 20); + const Score OtherCheck = S(10, 10); const Score ThreatByHangingPawn = S(71, 61); const Score LooseEnemies = S( 0, 25); const Score Hanging = S(48, 27); @@ -366,9 +367,10 @@ namespace { template Score evaluate_king(const Position& pos, const EvalInfo& ei) { - const Color Them = (Us == WHITE ? BLACK : WHITE); + const Color Them = (Us == WHITE ? BLACK : WHITE); + const Square Up = (Us == WHITE ? DELTA_N : DELTA_S); - Bitboard undefended, b, b1, b2, safe; + Bitboard undefended, b, b1, b2, safe, other; int attackUnits; const Square ksq = pos.square(Us); @@ -414,27 +416,42 @@ namespace { attackUnits += QueenContactCheck * popcount(b); } - // Analyse the enemy's safe distance checks for sliders and knights - safe = ~(ei.attackedBy[Us][ALL_PIECES] | pos.pieces(Them)); + // Analyse the safe enemy's checks which are possible on next move... + safe = ~(ei.attackedBy[Us][ALL_PIECES] | pos.pieces(Them)); - b1 = pos.attacks_from(ksq) & safe; - b2 = pos.attacks_from(ksq) & safe; + // ... and some other potential checks, only requiring the square to be + // safe from pawn-attacks, and not being occupied by a blocked pawn. + other = ~( ei.attackedBy[Us][PAWN] + | (pos.pieces(Them, PAWN) & shift_bb(pos.pieces(PAWN)))); + + b1 = pos.attacks_from(ksq); + b2 = pos.attacks_from(ksq); // Enemy queen safe checks - if ((b1 | b2) & ei.attackedBy[Them][QUEEN]) - attackUnits += QueenCheck, score -= Checked; + if ((b1 | b2) & ei.attackedBy[Them][QUEEN] & safe) + attackUnits += QueenCheck, score -= SafeCheck; - // Enemy rooks safe checks - if (b1 & ei.attackedBy[Them][ROOK]) - attackUnits += RookCheck, score -= Checked; + // Enemy rooks safe and other checks + if (b1 & ei.attackedBy[Them][ROOK] & safe) + attackUnits += RookCheck, score -= SafeCheck; - // Enemy bishops safe checks - if (b2 & ei.attackedBy[Them][BISHOP]) - attackUnits += BishopCheck, score -= Checked; + else if (b1 & ei.attackedBy[Them][ROOK] & other) + score -= OtherCheck; - // Enemy knights safe checks - if (pos.attacks_from(ksq) & ei.attackedBy[Them][KNIGHT] & safe) - attackUnits += KnightCheck, score -= Checked; + // Enemy bishops safe and other checks + if (b2 & ei.attackedBy[Them][BISHOP] & safe) + attackUnits += BishopCheck, score -= SafeCheck; + + else if (b2 & ei.attackedBy[Them][BISHOP] & other) + score -= OtherCheck; + + // Enemy knights safe and other checks + b = pos.attacks_from(ksq) & ei.attackedBy[Them][KNIGHT]; + if (b & safe) + attackUnits += KnightCheck, score -= SafeCheck; + + else if (b & other) + score -= OtherCheck; // Finally, extract the king danger score from the KingDanger[] // array and subtract the score from the evaluation. From 969982406ce85e38b88d15768ae2d3ee31fe82bb Mon Sep 17 00:00:00 2001 From: loco-loco Date: Thu, 5 May 2016 20:56:47 -0700 Subject: [PATCH 09/11] Merge good and bad quiets STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 58613 W: 10779 L: 10723 D: 37111 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 33608 W: 4539 L: 4436 D: 24633 Bench: 9441294 --- src/movepick.cpp | 22 ++++++++++------------ src/movepick.h | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/movepick.cpp b/src/movepick.cpp index e248b729..3e907503 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -26,7 +26,7 @@ namespace { enum Stages { - MAIN_SEARCH, GOOD_CAPTURES, KILLERS, GOOD_QUIETS, BAD_QUIETS, BAD_CAPTURES, + MAIN_SEARCH, GOOD_CAPTURES, KILLERS, QUIET, BAD_CAPTURES, EVASION, ALL_EVASIONS, QSEARCH_WITH_CHECKS, QCAPTURES_1, CHECKS, QSEARCH_WITHOUT_CHECKS, QCAPTURES_2, @@ -199,17 +199,15 @@ void MovePicker::generate_next_stage() { endMoves = cur + 2 + (countermove != killers[0] && countermove != killers[1]); break; - case GOOD_QUIETS: - endQuiets = endMoves = generate(pos, moves); + case QUIET: + endMoves = generate(pos, moves); score(); - endMoves = std::partition(cur, endMoves, [](const ExtMove& m) { return m.value > VALUE_ZERO; }); - insertion_sort(cur, endMoves); - break; - - case BAD_QUIETS: - cur = endMoves; - endMoves = endQuiets; - if (depth >= 3 * ONE_PLY) + if (depth < 3 * ONE_PLY) + { + ExtMove* goodQuiet = std::partition(cur, endMoves, [](const ExtMove& m) + { return m.value > VALUE_ZERO; }); + insertion_sort(cur, goodQuiet); + } else insertion_sort(cur, endMoves); break; @@ -282,7 +280,7 @@ Move MovePicker::next_move() { return move; break; - case GOOD_QUIETS: case BAD_QUIETS: + case QUIET: move = *cur++; if ( move != ttMove && move != killers[0] diff --git a/src/movepick.h b/src/movepick.h index fc090d29..fffd4708 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -100,7 +100,7 @@ private: Square recaptureSquare; Value threshold; int stage; - ExtMove *endQuiets, *endBadCaptures = moves + MAX_MOVES - 1; + ExtMove* endBadCaptures = moves + MAX_MOVES - 1; ExtMove moves[MAX_MOVES], *cur = moves, *endMoves = moves; }; From 16c603ce9baa464c2f59cbd001987ec3a7cbc01f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicolet?= Date: Wed, 11 May 2016 06:48:51 +0200 Subject: [PATCH 10/11] Double pawn simplification Try doubled pawn simplification, with psq table compensation. STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 36094 W: 6558 L: 6463 D: 23073 LTC: LLR: 2.94 (-2.94,2.94) [-3.00,1.00] Total: 102352 W: 13417 L: 13404 D: 75531 Bench: 8716243 --- src/pawns.cpp | 10 ++++------ src/psqt.cpp | 13 ++++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/pawns.cpp b/src/pawns.cpp index c5c42ff1..74b3fd5e 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -44,10 +44,8 @@ namespace { // Connected pawn bonus by opposed, phalanx, twice supported and rank Score Connected[2][2][2][RANK_NB]; - // Doubled pawn penalty by file - const Score Doubled[FILE_NB] = { - S(11, 34), S(17, 38), S(19, 38), S(19, 38), - S(19, 38), S(19, 38), S(17, 38), S(11, 34) }; + // Doubled pawn penalty + const Score Doubled = S(18,38); // Lever bonus by rank const Score Lever[RANK_NB] = { @@ -145,7 +143,7 @@ namespace { // either there is a stopper in the way on this rank, or there is a // stopper on adjacent file which controls the way to that rank. backward = (b | shift_bb(b & adjacent_files_bb(f))) & stoppers; - + assert(!backward || !(pawn_attack_span(Them, s + Up) & neighbours)); } @@ -169,7 +167,7 @@ namespace { score += Connected[opposed][!!phalanx][more_than_one(supported)][relative_rank(Us, s)]; if (doubled) - score -= Doubled[f] / distance(s, frontmost_sq(Us, doubled)); + score -= Doubled / distance(s, frontmost_sq(Us, doubled)); if (lever) score += Lever[relative_rank(Us, s)]; diff --git a/src/psqt.cpp b/src/psqt.cpp index 76e4e7de..60180adf 100644 --- a/src/psqt.cpp +++ b/src/psqt.cpp @@ -38,13 +38,12 @@ const Score Bonus[][RANK_NB][int(FILE_NB) / 2] = { { }, { // Pawn { S( 0, 0), S( 0, 0), S( 0, 0), S( 0, 0) }, - { S(-19, 5), S( 1,-4), S( 7, 8), S( 3,-2) }, - { S(-26,-6), S( -7,-5), S( 19, 5), S(24, 4) }, - { S(-25, 1), S(-14, 3), S( 20,-8), S(35,-3) }, - { S(-14, 6), S( 0, 9), S( 3, 7), S(21,-6) }, - { S(-14, 6), S(-13,-5), S( -6, 2), S(-2, 4) }, - { S(-12, 1), S( 15,-9), S( -8, 1), S(-4,18) }, - { S( 0, 0), S( 0, 0), S( 0, 0), S( 0, 0) } + { S(-16, 7), S( 1,-4), S( 7, 8), S( 3,-2) }, + { S(-23,-4), S( -7,-5), S( 19, 5), S(24, 4) }, + { S(-22, 3), S(-14, 3), S( 20,-8), S(35,-3) }, + { S(-11, 8), S( 0, 9), S( 3, 7), S(21,-6) }, + { S(-11, 8), S(-13,-5), S( -6, 2), S(-2, 4) }, + { S( -9, 3), S( 15,-9), S( -8, 1), S(-4,18) } }, { // Knight { S(-143, -97), S(-96,-82), S(-80,-46), S(-73,-14) }, From 0784bd542bf17679febd9d9d87858fd0fd0424f9 Mon Sep 17 00:00:00 2001 From: mstembera Date: Thu, 28 Apr 2016 12:13:32 -0700 Subject: [PATCH 11/11] Fix a multiPV bug in lazy SMP Where the helper threads were not doing multiPV at all. Regression tested sprt @ 5+0.05 th 7 LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 73918 W: 11891 L: 11853 D: 50174 bench: 8716243 --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 52bb0987..2828ccda 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -507,7 +507,7 @@ void Thread::search() { std::stable_sort(rootMoves.begin(), rootMoves.begin() + PVIdx + 1); if (!mainThread) - break; + continue; if (Signals.stop) sync_cout << "info nodes " << Threads.nodes_searched()