Skip to content

Commit

Permalink
Rewrite TBScore in uci_pv()
Browse files Browse the repository at this point in the history
Streamline the code and make
it understandable.

No functional change.

Resolves #135
  • Loading branch information
mcostalba authored and zamar committed Nov 30, 2014
1 parent 66f5cd3 commit a43f633
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/search.cpp
Expand Up @@ -1444,14 +1444,8 @@ namespace {
Depth d = updated ? depth : depth - ONE_PLY;
Value v = updated ? RootMoves[i].score : RootMoves[i].prevScore;

bool tb = RootInTB;
if (tb)
{
if (abs(v) >= VALUE_MATE - MAX_PLY)
tb = false;
else
v = TBScore;
}
bool tb = RootInTB && abs(v) < VALUE_MATE - MAX_PLY;
v = tb ? TBScore : v;

if (ss.rdbuf()->in_avail()) // Not at first line
ss << "\n";
Expand Down

0 comments on commit a43f633

Please sign in to comment.