LMR problems

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Cardoso
Posts: 317
Joined: Thu Mar 16, 2006 6:39 pm
Location: Portugal
Full name: Alvaro Cardoso
Contact:

LMR problems

Post by Cardoso » Mon May 16, 2016 5:10 pm

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: 867
Joined: Thu Mar 09, 2006 10:21 pm
Location: Nederland
Contact:

Re: LMR problems

Post by F. Bluemers » Tue May 17, 2016 5:35 pm

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: 927
Joined: Tue Mar 09, 2010 2:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: LMR problems

Post by AlvaroBegue » Tue May 17, 2016 5:39 pm

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: 4527
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: LMR problems

Post by Ferdy » Mon May 23, 2016 4:30 am

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: 6764
Joined: Mon May 27, 2013 8:31 am

Re: LMR problems

Post by Henk » Mon May 23, 2016 6:57 am

My brain is unable to understand LMR. So I removed it from my chess engine.

User avatar
hgm
Posts: 25820
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: LMR problems

Post by hgm » Mon May 23, 2016 7:33 am

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: 6764
Joined: Mon May 27, 2013 8:31 am

Re: LMR problems

Post by Henk » Mon May 23, 2016 7:41 am

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: 734
Joined: Fri Jan 04, 2013 3:55 pm
Location: Nice

Re: LMR problems

Post by Daniel Anulliero » Mon May 23, 2016 7:49 am

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: 6764
Joined: Mon May 27, 2013 8:31 am

Re: LMR problems

Post by Henk » Mon May 23, 2016 8:00 am

Please contact moderators instead of using word troll, trolling etc. It's their decision to block my account.

User avatar
hgm
Posts: 25820
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: LMR problems

Post by hgm » Mon May 23, 2016 8:51 am

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).

Post Reply