mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 09:13:08 +00:00
Always print a best move when requested
Little fix merged from iPhone Glaurung. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
66d165921d
commit
0ff3bf34cd
1 changed files with 8 additions and 0 deletions
|
@ -748,6 +748,11 @@ namespace {
|
|||
<< " hashfull " << TT.full() << std::endl;
|
||||
|
||||
// Print the best move and the ponder move to the standard output
|
||||
if (ss[0].pv[0] == MOVE_NONE)
|
||||
{
|
||||
ss[0].pv[0] = rml.get_move(0);
|
||||
ss[0].pv[1] = MOVE_NONE;
|
||||
}
|
||||
std::cout << "bestmove " << ss[0].pv[0];
|
||||
if (ss[0].pv[1] != MOVE_NONE)
|
||||
std::cout << " ponder " << ss[0].pv[1];
|
||||
|
@ -1389,6 +1394,9 @@ namespace {
|
|||
}
|
||||
TT.store(pos, value_to_tt(bestValue, ply), depth, m, VALUE_TYPE_LOWER);
|
||||
}
|
||||
|
||||
assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);
|
||||
|
||||
return bestValue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue