1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

Add mild extension in low depths

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Joona Kiiski 2009-11-22 14:58:07 +02:00 committed by Marco Costalba
parent 93c9f342ca
commit 58452de86d

View file

@ -1143,7 +1143,7 @@ namespace {
// Only move extension
if ( moveCount == 1
&& ext < OnePly
&& depth >= 8 * OnePly
&& depth >= 4 * OnePly
&& tte
&& (tte->type() & VALUE_TYPE_LOWER)
&& tte->move() != MOVE_NONE
@ -1152,9 +1152,9 @@ namespace {
Value ttValue = value_from_tt(tte->value(), ply);
if (abs(ttValue) < VALUE_KNOWN_WIN)
{
Value excValue = search(pos, ss, ttValue - OnlyMoveMargin, depth / 2, ply, false, threadID, tte->move());
Value excValue = search(pos, ss, ttValue - OnlyMoveMargin, Max(Min(depth / 2, depth - 4 * OnePly), OnePly), ply, false, threadID, tte->move());
if (excValue < ttValue - OnlyMoveMargin)
ext = OnePly;
ext = (depth >= 8 * OnePly)? OnePly : ext + OnePly / 2;
}
}
@ -1446,7 +1446,7 @@ namespace {
if ( forbiddenMove == MOVE_NONE
&& moveCount == 1
&& ext < OnePly
&& depth >= 8 * OnePly
&& depth >= 4 * OnePly
&& tte
&& (tte->type() & VALUE_TYPE_LOWER)
&& tte->move() != MOVE_NONE
@ -1455,9 +1455,9 @@ namespace {
Value ttValue = value_from_tt(tte->value(), ply);
if (abs(ttValue) < VALUE_KNOWN_WIN)
{
Value excValue = search(pos, ss, ttValue - OnlyMoveMargin, depth / 2, ply, false, threadID, tte->move());
Value excValue = search(pos, ss, ttValue - OnlyMoveMargin, Max(Min(depth / 2, depth - 4 * OnePly), OnePly), ply, false, threadID, tte->move());
if (excValue < ttValue - OnlyMoveMargin)
ext = OnePly;
ext = (depth >= 8 * OnePly)? OnePly : ext + OnePly / 2;
}
}