Merge commit '4912f5b0b5f2656bc5fcdb0af480765ad5aa8932' into cluster

This commit is contained in:
Steinar H. Gunderson
2025-12-24 13:55:47 +01:00
8 changed files with 68 additions and 47 deletions
+13 -3
View File
@@ -24,6 +24,7 @@
#include <memory>
#include <unordered_map>
#include <utility>
#include <string>
#include "cluster.h"
#include "misc.h"
@@ -34,6 +35,7 @@
#include "tt.h"
#include "types.h"
#include "ucioption.h"
#include "uci.h"
namespace Stockfish {
@@ -187,10 +189,18 @@ void ThreadPool::start_thinking(const OptionsMap& options,
increaseDepth = true;
Search::RootMoves rootMoves;
const auto legalmoves = MoveList<LEGAL>(pos);
for (const auto& m : MoveList<LEGAL>(pos))
if (limits.searchmoves.empty()
|| std::count(limits.searchmoves.begin(), limits.searchmoves.end(), m))
for (const auto& uciMove : limits.searchmoves)
{
auto move = UCIEngine::to_move(pos, uciMove);
if (std::find(legalmoves.begin(), legalmoves.end(), move) != legalmoves.end())
rootMoves.emplace_back(move);
}
if (rootMoves.empty())
for (const auto& m : legalmoves)
rootMoves.emplace_back(m);
Tablebases::Config tbConfig = Tablebases::rank_root_moves(options, pos, rootMoves);