We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8d6b25 commit ca4ac66Copy full SHA for ca4ac66
2 files changed
src/search.cpp
@@ -1554,6 +1554,10 @@ namespace {
1554
if (ss->ply >= MAX_PLY)
1555
return !ss->inCheck ? evaluate(pos) : VALUE_DRAW;
1556
1557
+ // Safeguard against too deep recursions in quiescence search
1558
+ if (depth < DEPTH_QS_MAX && !ss->inCheck)
1559
+ return evaluate(pos);
1560
+
1561
assert(0 <= ss->ply && ss->ply < MAX_PLY);
1562
1563
// Decide whether or not to include checks: this fixes also the type of
src/types.h
@@ -484,6 +484,7 @@ enum : int {
484
DEPTH_QS_CHECKS = 0,
485
DEPTH_QS_NO_CHECKS = -1,
486
DEPTH_QS_RECAPTURES = -5,
487
+ DEPTH_QS_MAX = -32,
488
489
DEPTH_NONE = -6,
490
0 commit comments