Minimum split depth

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Jouni
Posts: 3291
Joined: Wed Mar 08, 2006 8:15 pm

Minimum split depth

Post by Jouni »

In Houdini it is 10, but Critter has 6 and Stockfish only 4. Has it any measurable effect on engine's strength worth of testing?

Jouni
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Minimum split depth

Post by mcostalba »

Jouni wrote:In Houdini it is 10, but Critter has 6 and Stockfish only 4. Has it any measurable effect on engine's strength worth of testing?

Jouni
Yes it is but is difficult to test because it depends on the specific hardware, anyhow when SF detects at least 8 CPUs Minimum split depth is increased to 7.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Minimum split depth

Post by bob »

Jouni wrote:In Houdini it is 10, but Critter has 6 and Stockfish only 4. Has it any measurable effect on engine's strength worth of testing?

Jouni
It is a function of "cost of splitting." A tree of depth N requires a fairly consistent amount of time to search. As N reduces, so does the time. You do not want to split at N so small that the cost of splitting is more than the cost of doing the search. You just drove computational overhead past 50% which is intolerable. In fact, you probably don't want to exceed even 1%. There is already enough search overhead (extra nodes searched) in a parallel search, one does not voluntarily walk into more overhead.

By the same reasoning, making it too large is good for efficiency, but now you are limited as to where you can split, and rather than incurring more overhead by splitting trees that are too small, you have processors (threads) sitting idle because you are unable to split during the last N plies.

I believe 10 is too large for any program. For the ones I have tested, 4 is probably reasonable.

There is a better way, as 4 is a one-size-fits-all approach that is either optimal for middle-game or for end-game, but not both. I do it differently in Crafty and have found my approach to be better overall because it works pretty well for any game stage, not for a specific one.
User avatar
Houdini
Posts: 1471
Joined: Tue Mar 16, 2010 12:00 am

Re: Minimum split depth

Post by Houdini »

Jouni wrote:In Houdini it is 10, but Critter has 6 and Stockfish only 4. Has it any measurable effect on engine's strength worth of testing?

Jouni
Note that the "10" value for Houdini is in half-plies. This value appears to be best up to 4 cores, whereas for 8 cores very often 12 half-plies is slightly better.
Houdini has an "autotune" command to help you pick the best Split_Depth value for your configuration.

Robert
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Minimum split depth

Post by bob »

Houdini wrote:
Jouni wrote:In Houdini it is 10, but Critter has 6 and Stockfish only 4. Has it any measurable effect on engine's strength worth of testing?

Jouni
Note that the "10" value for Houdini is in half-plies. This value appears to be best up to 4 cores, whereas for 8 cores very often 12 half-plies is slightly better.
Houdini has an "autotune" command to help you pick the best Split_Depth value for your configuration.

Robert
I used to use that approach in Crafty, but I never found that the min split depth was related to number of cores. It was related to specific hardware since that is what dictates the cost of doing a split. There are other better ways to deal with more cores, such as the "thread group" idea used in Crafty so that you don't try to split a single node into 16 parallel searches if you have 16 total cores.

Those are two separate issues. Number of cores is unrelated to cost of splitting per thread. That is more a function of how much data you have to copy and how the machine can cope with that. The lower the memory bandwidth/higher latency, the larger I had to run up min split depth before I threw the idea out as simply bad. Splitting endgame trees vs splitting middlegame trees is a different animal entirely. If the cost for splitting remains constant (which it will) then the effort to search a sub-tree becomes important since this goes down in the endgame with fewer extensions and far fewer moves at any single node. The min split depth for middlegame and endgame would be different, optimally, and that really doesn't capture the gist of the problem being addressed. Too many took this idea from Crafty, so that it is now standard practice, but it is not a very good practice....