void update_history(const Position& pos, Move move, Depth depth, Move movesSearched[], int moveCount);
void do_skill_level(Move* best, Move* ponder);
void update_history(const Position& pos, Move move, Depth depth, Move movesSearched[], int moveCount);
void do_skill_level(Move* best, Move* ponder);
string score_to_uci(Value v, Value alpha = -VALUE_INFINITE, Value beta = VALUE_INFINITE);
string speed_to_uci(int64_t nodes);
string pv_to_uci(const Move pv[], int pvNum, bool chess960);
string score_to_uci(Value v, Value alpha = -VALUE_INFINITE, Value beta = VALUE_INFINITE);
string speed_to_uci(int64_t nodes);
string pv_to_uci(const Move pv[], int pvNum, bool chess960);
// Set output stream mode: normal or chess960. Castling notation is different
cout << set960(pos.is_chess960());
// Set output stream mode: normal or chess960. Castling notation is different
cout << set960(pos.is_chess960());
// if we have a fail high/low and we are deep in the search. UCI
// protocol requires to send all the PV lines also if are still
// to be searched and so refer to the previous search's score.
// if we have a fail high/low and we are deep in the search. UCI
// protocol requires to send all the PV lines also if are still
// to be searched and so refer to the previous search's score.
for (int i = 0; i < std::min(UCIMultiPV, (int)Rml.size()); i++)
{
bool updated = (i <= MultiPVIdx);
for (int i = 0; i < std::min(UCIMultiPV, (int)Rml.size()); i++)
{
bool updated = (i <= MultiPVIdx);
if (Options["Use Search Log"].value<bool>())
{
Log log(Options["Search Log Filename"].value<string>());
if (Options["Use Search Log"].value<bool>())
{
Log log(Options["Search Log Filename"].value<string>());
- log << pretty_pv(pos, depth, bestValue, elapsed_search_time(), &Rml[0].pv[0]) << endl;
+ log << pretty_pv(pos, depth, bestValue, elapsed_time(), &Rml[0].pv[0]) << endl;
// Stop search if most of available time is already consumed. We probably don't
// have enough time to search the first move at the next iteration anyway.
// Stop search if most of available time is already consumed. We probably don't
// have enough time to search the first move at the next iteration anyway.
{
// If we are allowed to ponder do not stop the search now but
// keep pondering until GUI sends "ponderhit" or "stop".
{
// If we are allowed to ponder do not stop the search now but
// keep pondering until GUI sends "ponderhit" or "stop".
// current_search_time() returns the number of milliseconds which have passed
// since the beginning of the current search.
// current_search_time() returns the number of milliseconds which have passed
// since the beginning of the current search.
// Print debug information every one second
if (!lastInfoTime || get_system_time() - lastInfoTime >= 1000)
// Print debug information every one second
if (!lastInfoTime || get_system_time() - lastInfoTime >= 1000)