X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=9386e453ca8e9d5ffaf7ef44bfd3f25bd3a7cd7d;hp=f71b54bc7d0fa6e22dc539b3b25f48d53c2ac666;hb=55376219b7cd17c1dc5d8361e969f30e5421e87e;hpb=161c6b025e763d6bcc8339a614be312f2b173437 diff --git a/src/search.cpp b/src/search.cpp index f71b54bc..9386e453 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -48,6 +48,7 @@ namespace Search { using std::string; using std::cout; using std::endl; +using Eval::evaluate; using namespace Search; namespace { @@ -251,6 +252,7 @@ void Search::think() { Position& pos = RootPosition; Chess960 = pos.is_chess960(); + Eval::RootColor = pos.side_to_move(); SearchTime.restart(); TimeMgr.init(Limits, pos.startpos_ply_counter()); TT.new_search(); @@ -276,17 +278,6 @@ void Search::think() { } } - // Read UCI options: GUI could change UCI parameters during the game - read_evaluation_uci_options(pos.side_to_move()); - Threads.read_uci_options(); - - TT.set_size(Options["Hash"]); - if (Options["Clear Hash"]) - { - Options["Clear Hash"] = false; - TT.clear(); - } - UCIMultiPV = Options["MultiPV"]; SkillLevel = Options["Skill Level"]; @@ -1351,7 +1342,7 @@ split_point_start: // At split points actual search starts from here // Rule 1. Checks which give opponent's king at most one escape square are dangerous b = kingAtt & ~pos.pieces(them) & ~newAtt & ~(1ULL << to); - if (!(b && (b & (b - 1)))) + if (single_bit(b)) // Catches also !b return true; // Rule 2. Queen contact check is very dangerous