Closed sfleischman105 closed 6 years ago
Here I'm going to outline the Pros and Cons of various Parallel Search Strategies.
Link HERE and HERE for further information.
Link HERE for further information.
Aren't there any other strategies?
@AnshulMalik Yes, quite a few actually!
The two examples listed above are actually referring to broader, over-arching parallel search implementations rather than specific algorithms. Both the YBWC and Lazy SMP have multiple possible implementation strategies for each.
The main difference between the two (to my knowledge!) is that in a YBWC-like algorithm, threads divide and conquer the possible moves in a list of moves, while in a Lazy SMP implementation the main source of communication / work sharing between threads is through a shared Transposition Table.
These are the two most "popular" strategies for parallel searching, due to decent scalability when the thread count is increased. Obviously some other implementations exist, such as Dynamic Tree Splitting, which could be worth looking into.
There is a fair amount of information available at with ChessWiki page on Parallel Search Strategies.
Great! @sfleischman105. I'll be doing more research on them.
As of #57, this library is split into pleco
(core functionality) and pleco_engine
(the uci searcher).
Currently, we are using the Lazy SMP approach, similar to stockfish. There is a non-negligible startup time for the searcher, but the multi-threading speedup far surpases anything before. Furthermore, we can write "sequential-esq" code with relative ease, allowing stuff like local variables and tables for each thread.
Currently, all the parallel algorithms implement Principal Variation Splitting (See section on ChessProgramming Wiki) to utilize mutli-core processing. PVS works by searching a set amount of moves sequentially to find an alpha cut-off, and then the remaining nodes are searched in parallel with that alpha cutoff. Can this be done better?