mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Move sending of PV line to id_loop()
No functional change apart form move reordering because pv_info_to_uci() performs a do / undo_move sequence. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -671,10 +671,13 @@ namespace {
|
|||||||
// Search starting from ss+1 to allow calling update_gains()
|
// Search starting from ss+1 to allow calling update_gains()
|
||||||
value = search<PV, false, true>(pos, ss+1, alpha, beta, depth, 0);
|
value = search<PV, false, true>(pos, ss+1, alpha, beta, depth, 0);
|
||||||
|
|
||||||
// Write PV lines to transposition table, in case the relevant entries
|
// Send PV line to GUI and write to transposition table in case the
|
||||||
// have been overwritten during the search.
|
// relevant entries have been overwritten during the search.
|
||||||
for (int i = 0; i < Min(MultiPV, (int)Rml.size()); i++)
|
for (int i = 0; i < Min(MultiPV, (int)Rml.size()); i++)
|
||||||
|
{
|
||||||
|
cout << Rml[i].pv_info_to_uci(pos, depth, alpha, beta, i) << endl;
|
||||||
Rml[i].insert_pv_in_tt(pos);
|
Rml[i].insert_pv_in_tt(pos);
|
||||||
|
}
|
||||||
|
|
||||||
// Value cannot be trusted. Break out immediately!
|
// Value cannot be trusted. Break out immediately!
|
||||||
if (StopRequest)
|
if (StopRequest)
|
||||||
@@ -1263,13 +1266,8 @@ split_point_start: // At split points actual search starts from here
|
|||||||
if (!isPvMove && MultiPV == 1)
|
if (!isPvMove && MultiPV == 1)
|
||||||
Rml.bestMoveChanges++;
|
Rml.bestMoveChanges++;
|
||||||
|
|
||||||
// Inform GUI that PV has changed, in case of multi-pv UCI protocol
|
|
||||||
// requires we send all the PV lines properly sorted.
|
|
||||||
Rml.sort_multipv(moveCount);
|
Rml.sort_multipv(moveCount);
|
||||||
|
|
||||||
for (int j = 0; j < Min(MultiPV, (int)Rml.size()); j++)
|
|
||||||
cout << Rml[j].pv_info_to_uci(pos, depth, alpha, beta, j) << endl;
|
|
||||||
|
|
||||||
// Update alpha. In multi-pv we don't use aspiration window, so
|
// Update alpha. In multi-pv we don't use aspiration window, so
|
||||||
// set alpha equal to minimum score among the PV lines.
|
// set alpha equal to minimum score among the PV lines.
|
||||||
if (MultiPV > 1)
|
if (MultiPV > 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user