Branching Factor?
Posted: 08 May 2006, 09:09
I often read the claim that the use of null-move pruning reduces the branching factor of a chess engine from 6-7 of plain alpha-beta to 3-4. On deeper analysis, it seems to me that this cannot be true:
If a search truly has a smaller branching factor, the number of plies it reaches for a given number of nodes would be a certain factor higher than that of the other search. In particular, if the branching factor drops from 6 to 4, the ratio of the search depths should be log 6/log 4 = 1.3, i.e. where one program searches 10 ply, the other searches 13, but when one searches 20, the other searches 26. The depthe advantage of the program with the lowest branching factor grows without bound if the search depth increases.
However, regular (as opposed to recursive) null-move pruning can never do that. An NMP tree of nominal depth N has some (in fact most) branches that run to depth N-R, and some branches that run to depth N. This tree definitely has fewer nodes than a fixed-depth search of depth N. But with nominal depth N+R the reduced branches all go to depth N, and the unpruned branches go to N+R. This tree is definitely bigger than a flat N-ply search. So the number of plies you gain from NMP can never be more than R.
So in the end NMP cannot lead to a reduction of the branching factor. It merely reduces the prefactor. For low depths this might create the suggestion of a lower branching ratio, because the pre-factor itself is (at these low depths) depth dependent: the fraction of branches that contain a null move is well below 100% initially, but as the depth increases, it becomes more and more likely that a null move could be employed somewhere along the path. But as soon as every path (except the PV) has a null move in it, the prefactor saturates and becomes depth independent again. Thus from that point on, also the apparent branching factor should return to its normal alpha-beta value of 6-7, limiting the advantage of NMP in plies to somewhere between 0 and R.
Does the claim of reduced branching factor only apply to recursive null-move pruning?
If a search truly has a smaller branching factor, the number of plies it reaches for a given number of nodes would be a certain factor higher than that of the other search. In particular, if the branching factor drops from 6 to 4, the ratio of the search depths should be log 6/log 4 = 1.3, i.e. where one program searches 10 ply, the other searches 13, but when one searches 20, the other searches 26. The depthe advantage of the program with the lowest branching factor grows without bound if the search depth increases.
However, regular (as opposed to recursive) null-move pruning can never do that. An NMP tree of nominal depth N has some (in fact most) branches that run to depth N-R, and some branches that run to depth N. This tree definitely has fewer nodes than a fixed-depth search of depth N. But with nominal depth N+R the reduced branches all go to depth N, and the unpruned branches go to N+R. This tree is definitely bigger than a flat N-ply search. So the number of plies you gain from NMP can never be more than R.
So in the end NMP cannot lead to a reduction of the branching factor. It merely reduces the prefactor. For low depths this might create the suggestion of a lower branching ratio, because the pre-factor itself is (at these low depths) depth dependent: the fraction of branches that contain a null move is well below 100% initially, but as the depth increases, it becomes more and more likely that a null move could be employed somewhere along the path. But as soon as every path (except the PV) has a null move in it, the prefactor saturates and becomes depth independent again. Thus from that point on, also the apparent branching factor should return to its normal alpha-beta value of 6-7, limiting the advantage of NMP in plies to somewhere between 0 and R.
Does the claim of reduced branching factor only apply to recursive null-move pruning?