Hi everyone, I'm finally trying to implement lazy smp into my engine.
I was finally able to launch more than one thread. Let them search in parallel and comunicate using only hash table.
I'm just testing whether or not I can have some elo gain.
I'd like to understood and study some lazy smp engines code. Stockfish for example launch n different Id loops. My engine launch only one Id loop and launch n parallel alpha beta.
What are the trends abd state of the arts in lazy smp?
What are engines that implementers it?
lazy smp questions
Moderators: hgm, Rebel, chrisw
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: lazy smp questions
Andscacs launches 1 id loop and n alpha_beta. I suppose the two alternatives are not different in strength.
Of course you should have a lot of elo gain, once there are no bugs.
As open source, you can see Cheng for example.
Another engine that have it is Nirvanachess.
Of course you should have a lot of elo gain, once there are no bugs.
As open source, you can see Cheng for example.
Another engine that have it is Nirvanachess.
Daniel José - http://www.andscacs.com
-
- Posts: 2559
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: lazy smp questions
Well, one thing that I don't like about my implementation is the way I stop helpers.
Currently I stop one by one, waiting on an event. This may cause problems when number of helper threads is large.
So I'm considering to either use an atomic counter and only set one event once it counts to zero
or simply use busy waiting in master thread, i.e. spinning and waiting for the counter to reach zero.
Otherwise I too use 1 id loop, I consider this superior (but I may be wrong - from what I've seen on various rating lists there's probably no elo difference).
I'm not sure one can say that lazy smp is state of the art. Let's say it's just lazy - but somehow it works
Currently I stop one by one, waiting on an event. This may cause problems when number of helper threads is large.
So I'm considering to either use an atomic counter and only set one event once it counts to zero
or simply use busy waiting in master thread, i.e. spinning and waiting for the counter to reach zero.
Otherwise I too use 1 id loop, I consider this superior (but I may be wrong - from what I've seen on various rating lists there's probably no elo difference).
I'm not sure one can say that lazy smp is state of the art. Let's say it's just lazy - but somehow it works
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: lazy smp questions
Vajolet is now working with multi thread code.
I'm j us t trying to understand if it's stronger than the single thread one.
I'm collecting some stat and i'll compare them whit the result of multi thread implementation of cheng.
Up to now 2 thread vs 1 at 6s+0.05 games give me a 25 elo gain
I'm j us t trying to understand if it's stronger than the single thread one.
I'm collecting some stat and i'll compare them whit the result of multi thread implementation of cheng.
Up to now 2 thread vs 1 at 6s+0.05 games give me a 25 elo gain