]> git.sesse.net Git - stockfish/commitdiff
More robust interaction of singular search and iid
authorDU-jdto <SNP_Tiranasta@hotmail.com>
Sun, 25 Feb 2018 00:14:29 +0000 (01:14 +0100)
committerStéphane Nicolet <cassio@free.fr>
Sun, 25 Feb 2018 00:15:38 +0000 (01:15 +0100)
When iid (Internal iterative deepening) is invoked, the prior value of ttValue is
not guaranteed to be VALUE_NONE. As such, it is currently possible to enter a state
in which ttValue has a specific value which is inconsistent with tte->bound() and
tte->depth(). Currently, ttValue is only used within the search in a context that
prevents this situation from making a difference (and so this change is non-functional,
but this is not guaranteed to remain the case in the future.

For instance, just changing the tt depth condition in singular extension node to be

    tte->depth() >= depth - 4 * ONE_PLY

instead of

    tte->depth() >= depth - 3 * ONE_PLY

interacts badly with the absence of ttMove in iid. For the ttMove to become a singular
extension candidate, singularExtensionNode needs to be true. With the current master,
this requires that tte->depth() >= depth - 3 * ONE_PLY. This is not currently possible
if tte comes from IID, since the depth 'd' used for the IID search is always less than
depth - 4 * ONE_PLY for depth >= 8 * ONE_PLY (below depth 8 singularExtensionNode can
never be true anyway). However, with DU-jdto/Stockfish@251281a , this condition can be
met, and it is possible for singularExtensionNode to become true after IID. There are
then two mechanisms by which this patch can affect the search:

• If ttValue was VALUE_NONE prior to IID, the fact that this patch sets ttValue allows
  the 'ttValue != VALUE_NONE' condition of singularExtensionNode to be met.

• If ttValue wasn't VALUE_NONE prior to IID, the fact that this patch modifies ttValue's
  value causes a different 'rBeta' to be calculated if the singular extension search is
  performed.

Tested at STC for non-regression:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 76981 W: 17060 L: 17048 D: 42873
http://tests.stockfishchess.org/tests/view/5a7738b70ebc5902971a9868

No functional change


No differences found