- value = -search<NonPV>(pos, ss, -(alpha+1), -alpha, newDepth-ss[ply].reduction, ply+1, true, threadID);
+ value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth-ss->reduction, ply+1, true, threadID);
+ doFullDepthSearch = (value > alpha);
+ }
+
+ // The move failed high, but if reduction is very big we could
+ // face a false positive, retry with a less aggressive reduction,
+ // if the move fails high again then go with full depth search.
+ if (doFullDepthSearch && ss->reduction > 2 * OnePly)
+ {
+ ss->reduction = OnePly;
+ value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth-ss->reduction, ply+1, true, threadID);