mcostalba/Stockfish — comment on commit 6e05055f06b301b16a37c3178d9d444cd09dc150
File:  line 0
By Kingdefender:

Hello Marco,

I was experimenting a bit with this change but just now ran into some overlooked moves when I needed another Movepicker for another experiment with Marek's code. I am not sure I found a bug in my version that caused it but in this code

95 + // Consider negative captures as good if still enough to reach beta
96 + else if (ss && ss->eval > beta)
97 + captureThreshold = beta - ss->eval;
98 +

I changed it in my version to

else
{
killers[0].move = ss->killers[0];
killers[1].move = ss->killers[1];

// Consider negative captures as good if still enough to reach beta
if ((abs(beta) < VALUE_MATE_IN_PLY_MAX) && ss && (ss->eval + ss->evalMargin > beta))
captureThreshold = beta - ss->eval - ss->evalMargin;

phasePtr = MainSearchTable;
}

because in the search as I had it beta can still be set at -VALUE_INFINTE with the line

MovePickerExt mp(pos, ttMove, depth, H, ss, PvNode ? -VALUE_INFINITE : beta);

Maybe you had already changed that in the search Marco?

Not so important but this line is no longer there also

91 + // Consider sligtly negative captures as good if at low depth and far from beta
93 92 if (ss && ss->eval < beta - PawnValueMidgame && d < 3 * ONE_PLY)
94 93 captureThreshold = -PawnValueMidgame;

but have not really tested that, I just wanted to point out that "sligtly" should be "slightly". But now by accident I pressed Fork and it seems I created a new one? Help, Sorry, can that be deleted again?

Regards, Eelco