mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Rewrite TBScore in uci_pv()
Streamline the code and make it understandable. No functional change. Resolves #135
This commit is contained in:
committed by
Joona Kiiski
parent
66f5cd3f9d
commit
a43f633c19
@@ -1444,14 +1444,8 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||||||
Depth d = updated ? depth : depth - ONE_PLY;
|
Depth d = updated ? depth : depth - ONE_PLY;
|
||||||
Value v = updated ? RootMoves[i].score : RootMoves[i].prevScore;
|
Value v = updated ? RootMoves[i].score : RootMoves[i].prevScore;
|
||||||
|
|
||||||
bool tb = RootInTB;
|
bool tb = RootInTB && abs(v) < VALUE_MATE - MAX_PLY;
|
||||||
if (tb)
|
v = tb ? TBScore : v;
|
||||||
{
|
|
||||||
if (abs(v) >= VALUE_MATE - MAX_PLY)
|
|
||||||
tb = false;
|
|
||||||
else
|
|
||||||
v = TBScore;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ss.rdbuf()->in_avail()) // Not at first line
|
if (ss.rdbuf()->in_avail()) // Not at first line
|
||||||
ss << "\n";
|
ss << "\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user