using std::string;
using std::cout;
using std::endl;
+using Eval::evaluate;
using namespace Search;
namespace {
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();
}
}
- // 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"];
// 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