Tested togheter with previous patch; shows no regression and
is a semplification.
After 5817 games:
Mod vs Orig 939 - 892 - 3986 ELO +2 (+- 5.1)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
&& !inCheck
&& !dangerous
&& move != ttMove
&& !inCheck
&& !dangerous
&& move != ttMove
+ && !is_castle(move)
+ && (bestValue > VALUE_MATED_IN_PLY_MAX || bestValue == -VALUE_INFINITE))
{
// Move count based pruning
if ( moveCount >= futility_move_count(depth)
{
// Move count based pruning
if ( moveCount >= futility_move_count(depth)
- && (!threatMove || !connected_threat(pos, move, threatMove))
- && bestValue > VALUE_MATED_IN_PLY_MAX) // FIXME bestValue is racy
+ && (!threatMove || !connected_threat(pos, move, threatMove)))
{
if (SpNode)
lock_grab(&(sp->lock));
{
if (SpNode)
lock_grab(&(sp->lock));
// Prune moves with negative SEE at low depths
if ( predictedDepth < 2 * ONE_PLY
// Prune moves with negative SEE at low depths
if ( predictedDepth < 2 * ONE_PLY
- && bestValue > VALUE_MATED_IN_PLY_MAX
&& pos.see_sign(move) < 0)
{
if (SpNode)
&& pos.see_sign(move) < 0)
{
if (SpNode)