Lazy SMP and "lazy cluster" experiments

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
TomKerrigan
Posts: 64
Joined: Fri Jul 03, 2015 7:22 pm

Re: Approximate ABDADA

Post by TomKerrigan » Sun Sep 10, 2017 8:21 pm

The way I do thread synchronization at the root is to have a data structure for the root search parameters: alpha, beta, depth, current best move, current best score, move that's failing a null-window search (if any).

I have one of these structures local to each thread, and one global structure for the "current best" parameters.

The global structure has a "job number" and each time it's updated with more current parameters, the job number is incremented.

If a thread's job number doesn't match the global job number, it collapses the search tree, copies the global parameters, and re-starts the search from the root. I check to make sure the job numbers match every few thousand nodes.

The global root parameters can't be updated by a thread unless the job numbers match, i.e., the thread is doing the most current search and has found new parameters.

I'm not saying this whole approach is especially good but it works alright and maybe it will give you an idea or two.

Post Reply