LMR problems

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Cardoso
Posts: 362
Joined: Thu Mar 16, 2006 7:39 pm
Location: Portugal
Full name: Alvaro Cardoso

LMR problems

Post by Cardoso »

Hi erveryone.
LMR is a nice idea and it does give an overall ELO increase.
Usually it works ok in my checkers engine.
But I had noticed my LMR implementation doesn't like loosing positions, when the score starts to go down badly.
When a certain line is loosing badly, I've seen the following:
After the first move is searched one of the other root moves fails high, but since it was searched at a reduced depth dictated by LMR it was not a precise search.
Now that move becomes the first root move and is now searched at full depth and this time results in a massive fail low.
Now my engine finds other moves that fail high and spends much time until it settles at the original best move.
So much effort wasted jumping from worse move to worse move, until it decides by the original best move.
Maybe the problem is that my LMR reductions becomes too agressive as the engine passes to the last moves in the move list.
Have you seen this kind of behaviour in your engines?

best regards,
Alvaro
F. Bluemers
Posts: 868
Joined: Thu Mar 09, 2006 11:21 pm
Location: Nederland

Re: LMR problems

Post by F. Bluemers »

Cardoso wrote:Hi erveryone.
LMR is a nice idea and it does give an overall ELO increase.
Usually it works ok in my checkers engine.
But I had noticed my LMR implementation doesn't like loosing positions, when the score starts to go down badly.
When a certain line is loosing badly, I've seen the following:
After the first move is searched one of the other root moves fails high, but since it was searched at a reduced depth dictated by LMR it was not a precise search.
Now that move becomes the first root move and is now searched at full depth and this time results in a massive fail low.
Now my engine finds other moves that fail high and spends much time until it settles at the original best move.
So much effort wasted jumping from worse move to worse move, until it decides by the original best move.
Maybe the problem is that my LMR reductions becomes too agressive as the engine passes to the last moves in the move list.
Have you seen this kind of behaviour in your engines?

best regards,
Alvaro
if the first move fails low it might still be the best.
you would have to research it with a full window else you will not get a correct lower bound.
for another move to replace the best ,
that move should be searched at full depth when it scored above alpha(or new best score).
Best
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: LMR problems

Post by AlvaroBegue »

Cardoso wrote:Hi erveryone.
LMR is a nice idea and it does give an overall ELO increase.
Usually it works ok in my checkers engine.
But I had noticed my LMR implementation doesn't like loosing positions, when the score starts to go down badly.
When a certain line is loosing badly, I've seen the following:
After the first move is searched one of the other root moves fails high, but since it was searched at a reduced depth dictated by LMR it was not a precise search.
Now that move becomes the first root move and is now searched at full depth and this time results in a massive fail low.
Now my engine finds other moves that fail high and spends much time until it settles at the original best move.
So much effort wasted jumping from worse move to worse move, until it decides by the original best move.
Maybe the problem is that my LMR reductions becomes too agressive as the engine passes to the last moves in the move list.
Have you seen this kind of behaviour in your engines?

best regards,
Alvaro
I have certainly seen this behavior, although I don't place a move as the first of the list until I have searched it with full depth and full alpha-beta window. So if I run out of time or the user aborts the search, in your scenario I would return the old best move, not the promising candidate of the moment.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: LMR problems

Post by Ferdy »

Cardoso wrote: But I had noticed my LMR implementation doesn't like loosing positions, when the score starts to go down badly.
LMR only helps to find the best move faster in a given position, by trial-searching uninteresting moves in a reduced depth at a given node. If you are sure that you are in a bad node, get out of this node immediately and search other moves - can also be called LMP (late move pruning).

LMR needs a good eval features (aside from move ordering), the program itself should know which position is bad and which position is good. The more positions it can distinguish whether it is good or it is bad, the more effective is the LMR.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: LMR problems

Post by Henk »

My brain is unable to understand LMR. So I removed it from my chess engine.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: LMR problems

Post by hgm »

What is there to understand? You just spend less times on thinking about moves that do not look promising. Human players do exactly the same, to a much greater extent (as they are better able to judge what is promising without actual calculation). If at some point it starts to dawn on you that a move was is more promising than it first looked, you give it the attention it deserves.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: LMR problems

Post by Henk »

Looks like my chess program can not decide in advance which moves are promising.

But I first have to find a good quick ELO test or estimator.
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: LMR problems

Post by Daniel Anulliero »

Henk wrote:Looks like my chess program can not decide in advance which moves are promising.

But I first have to find a good quick ELO test or estimator.
All experts here talked to you many times :
There is NO quick elo test
All is playing few thousand games but as usual you don't listen experts advices :wink:
At last : please , stop trolling
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: LMR problems

Post by Henk »

Please contact moderators instead of using word troll, trolling etc. It's their decision to block my account.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: LMR problems

Post by hgm »

Henk wrote:Looks like my chess program can not decide in advance which moves are promising.
Well, in Fairy-Max the simple algorithm that the hash move, all captures and all Pawn pushes are promising, and the rest not, seems to work pretty well. LMR really helped there.

In HaQiKi D I first calculate static recognition of threats (defined as attacks on unprotected or higher-valued pieces), and define non-captures that reduce the number of such threats against you as promising, while moves that increase it as especially unpromising (getting a larger reduction). In HaQiKi D this was comparatively cheap, because it needs to determine which pieces are protected anyway, for legality checking of the moves (as it would be illegal to create a repeat by attacking an unprotected or higher-valued piece).