const Value EasyMoveMargin = Value(0x200);
// Last seconds noise filtering (LSN)
- const bool UseLSNFiltering = true;
+ const bool UseLSNFiltering = false;
const int LSNTime = 100; // In milliseconds
const Value LSNValue = value_from_centipawns(200);
bool loseOnTime = false;
// Init futility margins array
for (d = 0; d < 16; d++) for (mc = 0; mc < 64; mc++)
- FutilityMarginsMatrix[d][mc] = 112 * int(log(double(d * d) / 2) / log(2.0) + 1) - 8 * mc + 45;
+ FutilityMarginsMatrix[d][mc] = 112 * int(log(double(d * d) / 2) / log(2.0) + 1.001) - 8 * mc + 45;
// Init futility move count array
for (d = 0; d < 32; d++)
}
-// SearchStack::init() initializes a search stack. Used at the beginning of a
-// new search from the root.
+// SearchStack::init() initializes a search stack entry.
+// Called at the beginning of search() when starting to examine a new node.
void SearchStack::init() {
pv[0] = pv[1] = MOVE_NONE;
eval = VALUE_NONE;
}
+// SearchStack::initKillers() initializes killers for a search stack entry
void SearchStack::initKillers() {
mateKiller = MOVE_NONE;
// Step 9. Internal iterative deepening
if ( depth >= IIDDepth[PvNode]
- && (ttMove == MOVE_NONE || (PvNode && tte->depth() <= depth - 4 * OnePly))
+ && ttMove == MOVE_NONE
&& (PvNode || (!isCheck && ss->eval >= beta - IIDMargin)))
{
Depth d = (PvNode ? depth - 2 * OnePly : depth / 2);
if (*dangerous)
{
- if (moveIsCheck)
+ if (moveIsCheck && pos.see_sign(m)>= 0)
result += CheckExtension[PvNode];
if (singleEvasion)