Page 1 of 1

Static NULL Move

Posted: Mon Dec 26, 2016 4:38 pm
by thevinenator
Please explain what this code (from CPW) is doing.

Code: Select all

    if (depth < 3
        && (!is_pv)
        && (!flagInCheck)
        && (abs(beta - 1) > -INF+100)) 
    {
        int static_eval = eval(alpha, beta, 1);
 
        int eval_margin = 120 * depth;
        if (static_eval - eval_margin >= beta)
            return static_eval - eval_margin;
    }
if not in PV and not in check...but what is

Code: Select all

(abs(beta - 1) > -INF+100))
doing?
won't beta almost always be greater than the low mate limit?

Re: Static NULL Move

Posted: Wed Dec 28, 2016 10:34 pm
by H.G.Muller
Indeed,it will. So you will only refrain from doing this if you have mate scores. Which makes sense, because the margin is in centiPawn, and mate scores are not be measured in centiPawns.

This is just an inefficient implementation of futility pruning / razoring. Normally you do the test (in reverse, because of negamax) in the parent node, to not waste any time on MakeMove.