mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Always use ss->bestMove to store ply best move
Instead of ss->currentMove. It is more consistent and clear to understand. Remark by Ralph Stoesser. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
9645e8e4e7
commit
87139d018c
1 changed files with 3 additions and 3 deletions
|
@ -1062,7 +1062,7 @@ namespace {
|
||||||
// Refresh tte entry to avoid aging
|
// Refresh tte entry to avoid aging
|
||||||
TT.store(posKey, tte->value(), tte->type(), tte->depth(), ttMove, tte->static_value(), tte->king_danger());
|
TT.store(posKey, tte->value(), tte->type(), tte->depth(), ttMove, tte->static_value(), tte->king_danger());
|
||||||
|
|
||||||
ss->currentMove = ttMove; // Can be MOVE_NONE
|
ss->bestMove = ttMove; // Can be MOVE_NONE
|
||||||
return value_from_tt(tte->value(), ply);
|
return value_from_tt(tte->value(), ply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1176,7 +1176,7 @@ namespace {
|
||||||
if (nullValue == value_mated_in(ply + 2))
|
if (nullValue == value_mated_in(ply + 2))
|
||||||
mateThreat = true;
|
mateThreat = true;
|
||||||
|
|
||||||
threatMove = (ss+1)->currentMove;
|
threatMove = (ss+1)->bestMove;
|
||||||
if ( depth < ThreatDepth
|
if ( depth < ThreatDepth
|
||||||
&& (ss-1)->reduction
|
&& (ss-1)->reduction
|
||||||
&& connected_moves(pos, (ss-1)->currentMove, threatMove))
|
&& connected_moves(pos, (ss-1)->currentMove, threatMove))
|
||||||
|
@ -1460,7 +1460,7 @@ namespace {
|
||||||
|
|
||||||
if (!PvNode && tte && ok_to_use_TT(tte, depth, beta, ply))
|
if (!PvNode && tte && ok_to_use_TT(tte, depth, beta, ply))
|
||||||
{
|
{
|
||||||
ss->currentMove = ttMove; // Can be MOVE_NONE
|
ss->bestMove = ttMove; // Can be MOVE_NONE
|
||||||
return value_from_tt(tte->value(), ply);
|
return value_from_tt(tte->value(), ply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue