EPR, even better than LMR!

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: EPR, even better than LMR!

Post by Daniel Shawul »

Sorry if my post has the unintended effect of offending you.
I was just trying to point out to you that Stockfish and others did not settle
on reduction of depth 2, as it seems you assumed that. The 'crazy' reductions,futility,
null-move prunings did bring hundreds of elo to them. But the irony was that
Marco was saying reduction of 2 did not work for him right before that..
I honestly don't see the limits of pruning as far as hardware improvement continues.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: EPR, even better than LMR!

Post by Michael Sherwin »

Daniel Shawul wrote:Sorry if my post has the unintended effect of offending you.
I was just trying to point out to you that Stockfish and others did not settle
on reduction of depth 2, as it seems you assumed that. The 'crazy' reductions,futility,
null-move prunings did bring hundreds of elo to them. But the irony was that
Marco was saying reduction of 2 did not work for him right before that..
I honestly don't see the limits of pruning as far as hardware improvement continues.
I was not offended and I did not mean to sound sarcastic. I was just pointing out the irony of not working on the eval first when an engine has a very sub par eval like RomiChess has. It seems to me that a bad eval magnifies its effects with extensions and reductions being increased just like a good eval, but not in a good way.

I'm already testing your 'theory' in that I've increased the reductions to see how much I loose. Then at the cost of a little performance I can increase the accuracy of my move ordering to see if anything is regained. I order the remaining moves by a shallow search and searching them deeper hurts performance slightly even though the order of the moves is improved. However, the extra reductions should make up for that.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: EPR, even better than LMR!

Post by mcostalba »

Daniel Shawul wrote: Marco was saying reduction of 2 did not work for him right before that..
I honestly don't see the limits of pruning as far as hardware improvement continues.
Yes, it is true. We really tested for months before to find the correct way to reduce more them one ply in LMR. The last patch that finally worked was by Joona, but we tried a lot before without success.

So now, after this experience, I can say that, yes, you can increase LMR depth and achieve ELO, but, no, it is absolutly NOT trivial to do this...it will take much more then a sunday afternoon.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: EPR, even better than LMR!

Post by Daniel Shawul »

Cool. 8-) Are you testing larger reductions in 'staged' manner ? moves after the 8th get 2 ply reduction , those after 24th get 3 ply etc... that is if all moves are sorted. Another thing that worked for me is to restrict to the standard one ply reduction towards the leaves 5 ply or less. However others have gotten away with out this constraint, very much dependent on the particular engine.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: EPR, even better than LMR!

Post by Michael Sherwin »

I have tried that in the past. I will try it this time also. Stay tuned!
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: EPR, even better than LMR!

Post by Daniel Shawul »

Two ply reductions worked for me in the past (like a 20 elo gain) , now I am trying to gain more from larger reductions but the result was not that impressive. Perhaps I will gain more if I tune the reduction amount based on depth and move count. My tuning mechanism is manual (one param at a time) , unlike yours :)
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: EPR, even better than LMR!

Post by mcostalba »

Daniel Shawul wrote:Two ply reductions worked for me in the past (like a 20 elo gain) , now I am trying to gain more from larger reductions but the result was not that impressive. Perhaps I will gain more if I tune the reduction amount based on depth and move count. My tuning mechanism is manual (one param at a time) , unlike yours :)
For LMR tuning is 100% manual and very hard to do, it requires a lot of patience, because you may want to test a given LMR setup at different time controls, and some of them relatively long.

Becasue you need thousand of games for more or less validate a patch with some degree of reliability you can guess why LMR tuning took us months !
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: EPR, even better than LMR!

Post by JVMerlino »

Daniel Shawul wrote:
LMR is good for just so much--it probably is a waste of valuable time to try to get more out of it. I should be happy that I was able to get a bigger elo jump with a LMR reduction of 2 ply instead of just 1.
No no micheal, squeeze harder :)
I used reductions of 2 in 2006 IIRC, nowadays big reductions of 4 plies in both LMR and Null move are used in the strongest engines. Also futility pruning at shallower (8 plies ?) is used on top of that. The 101 of chess programming is to equal search depths of your opponents before you work on eval.
I'm a little curious about whether or not any of you put a maximum on the number of plies a branch can be reduced. In the pathological case of the above implementation (as much as 4 plies!), a 15-ply search, for example, could be reduced to a 3-ply search, if I understand it correctly (search and reduce by 4, three consecutive times).

Is this ok? Sure seems dangerous to me. I've been playing with LMR for months as well, with only very slight improvement. But I have a cap of ((initial_depth / 3) + 1).

Everybody in this thread has said that it is very dependent on the engine, so maybe my implementation is truly best for the current state of Myrddin. But I'm still curious if anybody has a cap on their total reductions.

jm
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: EPR, even better than LMR!

Post by Daniel Shawul »

I do the 4 plies reduction after the 36th move. About 90% of fail highs occur within the first 3 moves,so it is highly unlikely you get a fail high after that. The restriction I use is to not do such heavy reductions below 5 plies (regular 1 ply reduction there). In the past I tried non-recursive reductions, something like !(pstack-1)->reduced , which are very restrictive. Infact before LMR was popularized Ed schroeder had posted a couple of non-recursive reductions similar to LMR. I belive LMR has more power due to it being recursive. The same was true of null move also . People first did it non-recursive until someone made a recursive version of it.. So I now believe more prunings will do more good than bad, if done smartly.
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: EPR, even better than LMR!

Post by JVMerlino »

Daniel Shawul wrote:I do the 4 plies reduction after the 36th move. About 90% of fail highs occur within the first 3 moves,so it is highly unlikely you get a fail high after that. The restriction I use is to not do such heavy reductions below 5 plies (regular 1 ply reduction there). In the past I tried non-recursive reductions, something like !(pstack-1)->reduced , which are very restrictive. Infact before LMR was popularized Ed schroeder had posted a couple of non-recursive reductions similar to LMR. I belive LMR has more power due to it being recursive. The same was true of null move also . People first did it non-recursive until someone made a recursive version of it.. So I now believe more prunings will do more good than bad, if done smartly.
So I assume you don't put any restrictions on the maximum number of plies that an entire branch can be reduced? In other words, if a move is reduced as many as 4 plies, is it possible for that move's response to also be reduced by 4 plies, and so on, potentially effectively reducing the inital depth by as much as 80% by the time it gets to qsearch?

Many thanks, and sorry if my initial question was confusing,

jm