I have two questions about a code implementing a static null move. The questions are in the code.

The code is extracted from here: CPW engine search code

 if (depth < 3
            && !is_pv
            && !flagInCheck
            &&  abs(beta - 1) > -INF + 100) // 1. Why this condition?
            int static_eval = eval(alpha, beta, 1);

            int eval_margin = 120 * depth; // 2. Why 120? What does it mean?
            if (static_eval - eval_margin >= beta)
                return static_eval - eval_margin;

1 Answer 1


Just guessing without reading all of the code to understand completely.

1) The third condition to not preform a Null Move is zugswang. Another hint is that INF is used to report a mate-in-x.

2) The purpose of a Null Move is to determine if we could do nothing and still be better so to cause an early cutoff. I assume that they represent a pawn value as 100, so they want a slightly higher favorable eval before it causes a cutoff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.