I have searched internet on how this works, but there is no proper documentation available - not even on the chess wiki. Is there a paper/documentation where Lazy SMP is explained?
Thanks in advance.
Lazy SMP - how it works
Moderators: hgm, Rebel, chrisw
-
- Posts: 24
- Joined: Tue Oct 13, 2015 2:52 am
Lazy SMP - how it works
--
Thanks,
Kalyan
Never Give UP!
Thanks,
Kalyan
Never Give UP!
-
- Posts: 411
- Joined: Thu Dec 30, 2010 4:48 am
Re: Lazy SMP - how it works
it's really really simple. exact implementation details vary. essentially all threads search on their own, only communicating via the hash table. some effort is usually done to get them out of sync earlier so they're doing different work like setting them to a variety of different depths to start.
And that's really all there is to it. What will or won't work in terms of details has to be tested, there is nothing to reason about because the search is so chaotic.
And that's really all there is to it. What will or won't work in terms of details has to be tested, there is nothing to reason about because the search is so chaotic.
-
- Posts: 4366
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Lazy SMP - how it works
It is similar to ABDADA, which was published a long time ago.
See https://chessprogramming.wikispaces.com ... Lazy%20SMP.
--Jon
See https://chessprogramming.wikispaces.com ... Lazy%20SMP.
--Jon
-
- Posts: 24
- Joined: Tue Oct 13, 2015 2:52 am
Re: Lazy SMP - how it works
Then what could be the specific differences between ABDADA vs. Lazy SMP.jdart wrote:It is similar to ABDADA, which was published a long time ago.
See https://chessprogramming.wikispaces.com ... Lazy%20SMP.
--Jon
It's frustrating why CPW doesn't have a page explaining Lazy SMP yet.
--
Thanks,
Kalyan
Never Give UP!
Thanks,
Kalyan
Never Give UP!
-
- Posts: 2250
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: Lazy SMP - how it works
I was too lazy so far to set up an own page ...krismchess wrote:Then what could be the specific differences between ABDADA vs. Lazy SMP.jdart wrote:It is similar to ABDADA, which was published a long time ago.
See https://chessprogramming.wikispaces.com ... Lazy%20SMP.
--Jon
It's frustrating why CPW doesn't have a page explaining Lazy SMP yet.
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Lazy SMP - how it works
I don't think there is any specific difference. Shared hash table SMP pretty much describes what it is. The main "new" idea that I suppose could be mentioned is that you launch threads on different iteration depths (instead of at the same depth). Statistically, that leads to less overhead than depending on random timing fluctuations to desynchronise the threads.krismchess wrote:Then what could be the specific differences between ABDADA vs. Lazy SMP.jdart wrote:It is similar to ABDADA, which was published a long time ago.
See https://chessprogramming.wikispaces.com ... Lazy%20SMP.
--Jon
Well, it's a wiki. Anyone who feels that there's more that needs to be said about it is free to add it...It's frustrating why CPW doesn't have a page explaining Lazy SMP yet.
Re: Lazy SMP - how it works
I tried:Evert wrote:Shared hash table SMP pretty much describes what it is. The main "new" idea that I suppose could be mentioned is that you launch threads on different iteration depths (instead of at the same depth). Statistically, that leads to less overhead than depending on random timing fluctuations to desynchronise the threads.
- each thread with different max-depth (it. deep. depth)
- each thread starting with a different move at the root
but sofar after, say 9 plies the threads start to run in lock-step.
So I think there's something else that must be done, right? Maybe this only works with non-locking TTs?
-
- Posts: 2555
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: Lazy SMP - how it works
Locks are cheap unless there's contentionflok wrote:Maybe this only works with non-locking TTs?
If you have x threads constantly fighting for a single lock then performance-wise can be order of magnitude slower than serial.
What you can try to remedy this is to use n locks (say 256) and index them via 8 lsbits of entry/bucket index.
You can also try to avoid locks completely, I use Bob's xor-trick but AFAIK some engines don't bother at all,
all you need is robust validation of TT move.
-
- Posts: 931
- Joined: Tue Mar 09, 2010 3:46 pm
- Location: New York
- Full name: Álvaro Begué (RuyDos)
Re: Lazy SMP - how it works
One difference between ABDADA and lazy SMP is that in ABDADA the hash entry keeps track of how many threads are working on it. I forgot exactly how that information was used (I read the paper many years ago), but it somehow discourages other threads from going down the same path.