21 #define SELECT_CHECKMATE_LOG 
   29   : node_count(0), quiescence_count(0), checkmate_count(0)
 
   41   std::cerr << 
"?? invalid move in table " << move.
move() << 
" " << move.
logProb()
 
   42             << 
" limit " << limit << 
"\n" 
   48   node_count = quiescence_count = checkmate_count = 0;
 
   56   reportCount(std::cerr, sec);
 
   62   os << 
"#normal : " << nodeCount() << 
", ";
 
   63   os << 
"#quiescence: " << quiescenceCount() << 
", ";
 
   64   os << 
"#checkmate : " << checkmateCount() << 
"\n";
 
   70   const double total = nodeCount() + quiescenceCount() + checkmateCount();
 
   71   os << 
"#total : " << total
 
   72      << std::setprecision(10)
 
   73      << 
" in " << seconds << 
" sec., " << total/seconds << 
" nodes/sec." 
   74      << std::setprecision(4)
 
   75      << 
" (quiesce " << 100.0*quiescenceCount()/total << 
"%," 
   76      << 
" checkmate " << 100.0*checkmateCount()/total << 
"%)\n";
 
   94       current_depth(0), initial_limit(0),
 
  102     os << current_depth << 
':';
 
  104     for (
int i=0; i<=current_depth; ++i)
 
  113 #ifdef SELECT_CHECKMATE_LOG 
  114       (limit <= initial_limit) 
 
  117       (initial_limit - limit) <= log_margin;
 
  141   recorder->log_margin = margin;
 
  147   ++recorder->current_depth;
 
  148   if (recorder->notSoDeep(limit-100)) 
 
  150     std::ostream& os = stream();
 
  153     os << 
" " << m.
logProb() << 
"\t"  
  154        << 
"last_f: " << last_f << 
" limit: " << limit << 
"\n";
 
  161                         int retryCount)
 const 
  163   ++recorder->current_depth;
 
  164   if (recorder->notSoDeep(limit)) 
 
  166     std::ostream& os = stream();
 
  167     os << 
"ex" << retryCount << 
"> ";
 
  169     os << 
" " << m.
logProb() << 
"\t"  
  170        << 
"last_f: " << last_f << 
" limit: " << limit << 
"\n";
 
  178   if (recorder->notSoDeep(limit)
 
  181     std::ostream& os = stream();
 
  182     os << 
"<== " << val << 
"\t";
 
  188   --recorder->current_depth;
 
  193   return (p == 
osl::BLACK) ? 
"B (lb)>" : 
"W (lb)<";
 
  197   return (p == 
osl::BLACK) ? 
"B (ub)<" : 
"W (ub)>";
 
  203   if (recorder->notSoDeep(limit))
 
  205     stream() << 
"==| table answered " << 
lowerChar(p) << val
 
  206              << 
" for " << p << 
" last_f " << last_f << 
"\n";
 
  214   if (recorder->notSoDeep(limit))
 
  216     stream() << 
"==| table answered " << 
higherChar(p) << val
 
  217              << 
" for " << p << 
" last_f " << last_f << 
"\n";
 
  228   if (recorder->notSoDeep(limit-100)) 
 
  230     std::ostream& os = stream();
 
  231     os << 
"|== table store " << 
lowerChar(p) << val << 
" ";
 
  233     os << 
" limit " << limit << 
"\n";
 
  243   if (recorder->notSoDeep(limit-100)) 
 
  245     std::ostream& os = stream();
 
  246     os << 
"|== table store " << 
higherChar(p) << val << 
" ";
 
  248     os << 
" limit " << limit << 
"\n";
 
  256   stream() << 
"low fail,  last_f=" << last_f << 
"\n";
 
  257   reportCount(stream());
 
  262   stream() << 
"high fail, last_f=" << last_f << 
" " << best_move << 
"\n";
 
  263   reportCount(stream());
 
  269   stream() << 
"\nnew search: limit " << limit 
 
  270            << 
", log " << recorder->log_margin << 
"\n";
 
  271   recorder->initial_limit = 
limit;
 
  277   stream() << 
"search finished\t" << best_move << 
"\n";
 
  283 #ifdef CHECKMATE_SEARCHER_DEBUG
 
  287 #ifdef CHECKMATE_SEARCHER_DEBUG
 
  292 #ifdef CHECKMATE_SEARCHER_DEBUG 
  295   os << nodeLimit << 
"\n";
 
  302 #ifdef CHECKMATE_SEARCHER_DEBUG 
  311   return recorder->stream();