Tord Romstad wrote:Hi all,
Does strong YBWC perform noticably better than weak YBWC on a small number of CPUs (8 or less)? If the answer is yes, what is the best definition of "promising moves" for chess? Winning captures and killer moves, perhaps?
I do not know the answer to the first part of your question. But as to the second part, I use this condition:
- Code: Select all
//
// Can we search the remaining moves in parallel?
//
if ((((uLegalMoves >= 1) && ((iAlpha + 1) != iBeta)) ||
((uLegalMoves >= 3) && (iAlpha == iInitialAlpha))) &&
(0 != g_uNumHelpersAvailable) &&
(uDepth >= TWO_PLY))
{
The results of this are pretty good, IMHO. Here's a sample taken from the first few positions in last night's ecm run:
- Code: Select all
Split 2142 times total (~ 107.05x/sec).
...97 ( 4.53 percent) terminated early.
Helper thread 0: 98.00 percent busy.
Split 3491 times total (~ 173.66x/sec).
...153 ( 4.38 percent) terminated early.
Helper thread 0: 98.68 percent busy.
Split 2306 times total (~ 114.92x/sec).
...90 ( 3.90 percent) terminated early.
Helper thread 0: 98.86 percent busy.
Split 2377 times total (~ 117.98x/sec).
...53 ( 2.23 percent) terminated early.
Helper thread 0: 98.73 percent busy.
Split 1716 times total (~ 85.08x/sec).
...94 ( 5.48 percent) terminated early.
Helper thread 0: 98.48 percent busy.
Split 2848 times total (~ 142.16x/sec).
...30 ( 1.05 percent) terminated early.
Helper thread 0: 98.35 percent busy.
Note that I'm running on a dual proc machine with one main thread and one helper thread. A "split" terminating early basically means one of the threads working on it failed high and I had to abort the other thread's search. This is reasonably rare -- you can improve it by messing with the condition above but I am happy with this balance.
As an aside, I've messed around with trying to use the same fail high "history" counters people are using for LMR to help pick where it is good to split the tree but never got this working as well as the simple conditions above. With good move ordering, though, you're reasonably sure that if you will fail high it will happen in the first few moves... therefore if you don't fail high in the first few moves you're probably not going to.
Also note that g_uNumHelpersAvailable is volatile and, on 4cpu machines, by the time this thread gets around to splitting the tree it may have to go it alone (if all available helpers got tied up working on another split). I've not done a lot of testing on 4cpu machines but this seems to work reasonably well.
Scott