fulitiy + lmr; funny results

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Mangar
Posts: 65
Joined: Thu Jul 08, 2010 7:16 am

fulitiy + lmr; funny results

Post by Mangar » Tue Dec 28, 2010 1:32 pm

Hi,

like many chess engines we reduce late moves in the last plys of search. If there is only few plys left to search they could be pruned instead of a shallow search. I thiks this was first done by Toga.

I a game I found a bad effect. In an endgame there was only one move to hold draw and may other loosing moves. As the position was near leaf the drawish move was pruned and the position was decided a loss. As eval knew the rule it was funny that eval knew it was draw and search found a loss.

Thus I tried the following rule:
If inner_node_eval is > Alpha - Margin then try more moves before pruning. First thing I discovered is that the search depth increases a little (decrease was expected). Second is loses several elos and got far worse on tactical positions tests.

Any body else tried to reduce the amount of pruned moves in lmr because of current eval? I know value based pruning done in stockfish that does not help or harm in Spike. I can´t imagine why searching more moves in positions with eval >= alpha - margin leads to less tactical force at same serach depth.

I have tools to browse throuh our search tree. Thus I know that it works, more moves has been searched. I compared a few amount of serach trees to see why the additional moves searched harm. The answer I found was the move ordering. The tactical move to find was allways orderd much later by history tables and thus found later.

Any ideas or tests?

Greetings Volker
Mangar Spike Chess

Engin
Posts: 831
Joined: Mon Jan 05, 2009 6:40 pm
Location: Germany
Full name: Engin Üstün
Contact:

Re: fulitiy + lmr; funny results

Post by Engin » Tue Dec 28, 2010 8:38 pm

if i am not missunderstand stockfish it not pruning connected moves never, i dont have implement connected moves and prune those move too, its makes not much effects in tactical thought, but i do the reduced move count prune much later then, and by the LMR i dont reduce for the first 3 moves more then one ply, because of tactical risk.

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 7:17 pm

Re: fulitiy + lmr; funny results

Post by mcostalba » Tue Dec 28, 2010 10:36 pm

Mangar wrote: Any body else tried to reduce the amount of pruned moves in lmr because of current eval?
Yes, we have tried very hard to throw "distance from beta" in the LMR reduction formula, because it seems (at least to me) a very natural thing to do.

Currently LMR reductions in Stockfish are based on depth and on the move count (distance from first move). It seems very naturally to add a third parameter "distance from beta" so that positions where evaluation is above beta are reduced less then positions well below beta. Interestingly and somewhat surprisingly, although the big efforts we did in this direction, we were unable to get an ELO increase so that at the moment we stay with current 2 LMR parameters: depth and move count

I really don't know why eval score doesn't seem to work with LMR :-(

Mangar
Posts: 65
Joined: Thu Jul 08, 2010 7:16 am

Re: fulitiy + lmr; funny results

Post by Mangar » Wed Dec 29, 2010 11:45 am

mcostalba wrote:
Yes, we have tried very hard to throw "distance from beta" in the LMR reduction formula, because it seems (at least to me) a very natural thing to do.

Currently LMR reductions in Stockfish are based on depth and on the move count (distance from first move). It seems very naturally to add a third parameter "distance from beta" so that positions where evaluation is above beta are reduced less then positions well below beta. Interestingly and somewhat surprisingly, although the big efforts we did in this direction, we were unable to get an ELO increase so that at the moment we stay with current 2 LMR parameters: depth and move count

I really don't know why eval score doesn't seem to work with LMR :-(
Hi,

thanks for that reply. At least I don´t feel stupid any longer :-)

The lmr has several misterious effects. For example I gain some elo if I count illegal moves of pinned pieces instead of ignoring them for move count.

Maybe a problem with allready reduced move. There might be a cut node that if fails low leads to a research of an allready reduced move. Maybe then the rule: if the "usual" good moves doesn´t work for this cut node reasearch the hole part of the tree. There might be some tactical issues.
One thing I´ll try is to use the "beta-parameter" only on not reduced positions or at positions where searching more moves could only lead to a research of an earlier reduction.

Greetings Volker
Mangar Spike Chess

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 7:17 pm

Re: fulitiy + lmr; funny results

Post by mcostalba » Wed Dec 29, 2010 1:10 pm

Mangar wrote: The lmr has several misterious effects. For example I gain some elo if I count illegal moves of pinned pieces instead of ignoring them for move count.
This could be an hint that your movecount rule is a bit too shy and you could push it a bit more....just a guess ;-)

Ferdy
Posts: 3714
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: fulitiy + lmr; funny results

Post by Ferdy » Wed Dec 29, 2010 4:53 pm

I can´t imagine why searching more moves in positions with eval >= alpha - margin leads to less tactical force at same serach depth.
How about adding another condition eval < 2*QUEEN_VALUE, the point being why would you try to search more moves when you are probably already winning.

I don't reduce and prune in ending without rooks. I also need to improve my eval to adapt inner nodes position evaluation.

For lmr, I guess the current eval has less influence on move being reduced. Individual moves have different impacts on the positions. It is the move not the current eval that determines the future of positions, because even if the current eval is good and yet the next move made is bad, everything is ruined.

bob
Posts: 20358
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: fulitiy + lmr; funny results

Post by bob » Thu Dec 30, 2010 5:53 pm

Mangar wrote:Hi,

like many chess engines we reduce late moves in the last plys of search. If there is only few plys left to search they could be pruned instead of a shallow search. I thiks this was first done by Toga.
I think Kent did it first. Then Heinz explained an extension to the idea in Dark Thought. It has been around forever.

I a game I found a bad effect. In an endgame there was only one move to hold draw and may other loosing moves. As the position was near leaf the drawish move was pruned and the position was decided a loss. As eval knew the rule it was funny that eval knew it was draw and search found a loss.

Thus I tried the following rule:
If inner_node_eval is > Alpha - Margin then try more moves before pruning. First thing I discovered is that the search depth increases a little (decrease was expected). Second is loses several elos and got far worse on tactical positions tests.

Any body else tried to reduce the amount of pruned moves in lmr because of current eval? I know value based pruning done in stockfish that does not help or harm in Spike. I can´t imagine why searching more moves in positions with eval >= alpha - margin leads to less tactical force at same serach depth.

I have tools to browse throuh our search tree. Thus I know that it works, more moves has been searched. I compared a few amount of serach trees to see why the additional moves searched harm. The answer I found was the move ordering. The tactical move to find was allways orderd much later by history tables and thus found later.

Any ideas or tests?

Greetings Volker
There are two issues. Reaching extreme depth. Making fewer mistakes. If you are not careful, changing one changes the other. Sometimes hurting, sometimes helping. If you fix a position that you find, you likely hurt many more you didn't know about. That is why testing in real games (and lots of them) is so important...

Uri Blass
Posts: 8335
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: fulitiy + lmr; funny results

Post by Uri Blass » Thu Dec 30, 2010 6:52 pm

mcostalba wrote:
Mangar wrote: Any body else tried to reduce the amount of pruned moves in lmr because of current eval?
Yes, we have tried very hard to throw "distance from beta" in the LMR reduction formula, because it seems (at least to me) a very natural thing to do.

Currently LMR reductions in Stockfish are based on depth and on the move count (distance from first move). It seems very naturally to add a third parameter "distance from beta" so that positions where evaluation is above beta are reduced less then positions well below beta. Interestingly and somewhat surprisingly, although the big efforts we did in this direction, we were unable to get an ELO increase so that at the moment we stay with current 2 LMR parameters: depth and move count

I really don't know why eval score doesn't seem to work with LMR :-(
I wonder if you tried distance from 0 instead of distance from beta.
The idea is to have more stable rule of reductions because if you use distance from beta you may reduce lines in iteration x and do not reduce them in iteration x+1.

Post Reply