mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 17:49:35 +00:00
Use opening book when pondering
Otherwise we will not use move given by opening book when we receive 'ponderhit'-command. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
c7866a4215
commit
d44fa46082
1 changed files with 4 additions and 1 deletions
|
@ -351,7 +351,7 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
|
|||
UseTimeManagement = !ExactMaxTime && !MaxDepth && !MaxNodes && !InfiniteSearch;
|
||||
|
||||
// Look for a book move, only during games, not tests
|
||||
if (UseTimeManagement && !ponder && get_option_value_bool("OwnBook"))
|
||||
if (UseTimeManagement && get_option_value_bool("OwnBook"))
|
||||
{
|
||||
Move bookMove;
|
||||
if (get_option_value_string("Book File") != OpeningBook.file_name())
|
||||
|
@ -360,6 +360,9 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
|
|||
bookMove = OpeningBook.get_move(pos);
|
||||
if (bookMove != MOVE_NONE)
|
||||
{
|
||||
if (PonderSearch)
|
||||
wait_for_stop_or_ponderhit();
|
||||
|
||||
cout << "bestmove " << bookMove << endl;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue