Moderator: Andres Valverde
H.G.Muller wrote:Does the claim of reduced branching factor only apply to recursive null-move pruning?
Stan Arts wrote:Imho there are a lot of side effects, for example the R reduced search is being done with a closed window around beta that could in some cases return faster then a regular search to N-R.
H.G.Muller wrote: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?
bob wrote:Let me add, for my first post here, that this is actually "mangling" a well-known term. "branching factor".
Null move absolutely can _not_ reduce the branching factor of the tree. The only thing that can do that is classic forward pruning. Null move does reduce the "effective branching factor" which is normally computed as
EBF = (time for iteration N) / (time for iteration N-1)
and since null-move reduces the overall size of the tree, the search time is reduced, and the "effective branching factor" is reduced accordingly.
It is easy to measure the improvement using Crafty. Just add "selective 0/0" as a command before searching a position, then search the same position without that command and compare the times or use the iteration statistics to compute the EBF for each new iteration. sel 0/0 totally disables null-move.
Add null-move and late-move reductions and EBFs of 2 or lower are quite common... which is remarkable.
H.G.Muller wrote:OK, so I was referring to the EBF. But I still don't see how a non-recursive null-move pruning could reduce the asymptotic EBF (in the limit for very large N). NMP can at most take R plies of (nearly) every line, which result in a constant saving factor independent of N, and thus does not affect the EBF.
A minimal tree will have a PV and all lines branching from it will be "refutation trees" of alternating all nodes and cut nodes. With perfect move sorting the cut nodes will only try a single move.
This should not be dependent on manipulations with the window. A null window in the refutation branches makes you more tolerant in the cut nodes, enhancing the probability that a non-best move will still be able to produce the cutoff. But that is only important in the case of imperfect move sorting.
So should the conclusion really be that the improvement of the EBF occurs in the cut nodes, that on the average find the cut move after fewer tries with NMP because the null move is the cut move more often than any other move that seems a likely cut move, and is always tried first?
H.G.Muller wrote:The hash table should indeed truly reduce the EBF. I was rather disappointed, though, how few ranspositions remain in a minimax tree with good move sorting. I only counted about 5% of transposition hits with sufficient draft, even under conditions where virtually no positions have to be overwritten. So that should reduce the EBF by only 5%.
diepeveen wrote:H.G.Muller wrote:The hash table should indeed truly reduce the EBF. I was rather disappointed, though, how few ranspositions remain in a minimax tree with good move sorting. I only counted about 5% of transposition hits with sufficient draft, even under conditions where virtually no positions have to be overwritten. So that should reduce the EBF by only 5%.
H.G.Muller wrote:Well, if my hash-table hits are homogeneously distributed over depth, that should be the case, shouldn't it? If 5% of the daughter nodes of a given node is not searched because the hash table already contained the search result, at each level of the tree you only search only 95% of the moves in an all node, while in 5% of he cut nodes atthat level you don't have to search any move at all, (since you have a transposition cutoff), and in 95% of the cut nodes just one. And if only 95% of the moves have to be searched at any level, that would lower the EBF by 5%, wouldn't it?
H.G.Muller wrote:Or is the hit rate systematically different in all nodes and cut nodes?
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 37 guests