mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Prefer ttMove to tte->move() in search()
Avoids aliasing problems due to TT overwrites. Node changes becuase of IID. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
de58594b0f
commit
6624105b5b
1 changed files with 3 additions and 4 deletions
|
@ -871,8 +871,8 @@ namespace {
|
||||||
search<PvNode>(pos, ss, alpha, beta, d);
|
search<PvNode>(pos, ss, alpha, beta, d);
|
||||||
ss->skipNullMove = false;
|
ss->skipNullMove = false;
|
||||||
|
|
||||||
ttMove = ss->bestMove;
|
|
||||||
tte = TT.probe(posKey);
|
tte = TT.probe(posKey);
|
||||||
|
ttMove = tte ? tte->move() : MOVE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
split_point_start: // At split points actual search starts from here
|
split_point_start: // At split points actual search starts from here
|
||||||
|
@ -885,8 +885,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
singularExtensionNode = !Root
|
singularExtensionNode = !Root
|
||||||
&& !SpNode
|
&& !SpNode
|
||||||
&& depth >= SingularExtensionDepth[PvNode]
|
&& depth >= SingularExtensionDepth[PvNode]
|
||||||
&& tte
|
&& ttMove != MOVE_NONE
|
||||||
&& tte->move()
|
|
||||||
&& !excludedMove // Do not allow recursive singular extension search
|
&& !excludedMove // Do not allow recursive singular extension search
|
||||||
&& (tte->type() & VALUE_TYPE_LOWER)
|
&& (tte->type() & VALUE_TYPE_LOWER)
|
||||||
&& tte->depth() >= depth - 3 * ONE_PLY;
|
&& tte->depth() >= depth - 3 * ONE_PLY;
|
||||||
|
@ -949,7 +948,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
// on all the other moves but the ttMove, if result is lower than ttValue minus
|
// on all the other moves but the ttMove, if result is lower than ttValue minus
|
||||||
// a margin then we extend ttMove.
|
// a margin then we extend ttMove.
|
||||||
if ( singularExtensionNode
|
if ( singularExtensionNode
|
||||||
&& move == tte->move()
|
&& move == ttMove
|
||||||
&& ext < ONE_PLY)
|
&& ext < ONE_PLY)
|
||||||
{
|
{
|
||||||
Value ttValue = value_from_tt(tte->value(), ss->ply);
|
Value ttValue = value_from_tt(tte->value(), ss->ply);
|
||||||
|
|
Loading…
Add table
Reference in a new issue