Which 10 do you search with wide window? How do you know one of the best 10 is not ranked last at the root?jwes wrote:You could search 10 with wide window and then search the rest with a null window based on the lowest score of the 10 and research on fail high. The big difference is with the hash table. In crafty, you clear the hash table between variations to avoid weirdness. If you search with n open windows, there is no need to clear the hash table.bob wrote:There is a difference. A typical position has 38 legal moves. Suppose you want the "best 10" moves.hgm wrote:Your approach does seem to search all the later moves N times with closed window, though, while my method searches them only once (also with closed window).
Of course the closed-window searches are not very expensive in comparison to the first N, but there are a lot of other moves, so it might still add up to something significant.
To find the best move, you search 1 with full window, 37 with null-window.
To find the second best, you search 1 with full window, 36 with null window.
...
To find the tenth best, you search 1 with full window, 28 with null-window.
Total is 10 with full window, 323 moves searched with null-window.
Now to compare effort. I looked at a few positions from the last CCT event where we used an 8-way box. The first move searched on the final iteration that was completely finished took from 50% to 75% of the total time. With most being closer to 75 (I did not do an exhaustive comparison however so this is just a close guess).
That means that 10 of my searches above will take 10 x 75 computation units, while the remaining moves will take what is effectively 10 x 25. So that the entire process takes about 10x longer. Since you can't know which of the 38 moves are the 10 best, it would seem to me that the only alternative would be to search all 38 with a wide window, which translates into 38 * 75 computation units. 38*75 is > 10*100, so it would appear to me that the best approach was the one I described. Not the easiest to program, but the best from a search space point of view...
If you don't clear hash tables, the scores interact and don't make a lot of sense. The second-best move can return a higher score than the best move, for example, because some scores from the best move get grafted into the tree for the second-best...
And searching with open windows doesn't solve the hashing issue at all. I already search each best move with an "open window" and the hash table causes interaction between the different best moves... That problem remains and can't be eliminated except by clearing things.