LMR problems

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: LMR problems

Post by Henk »

hgm wrote:
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).
Might be that what works for Fairy-max also works for Skipper.

I don't understand that all Pawn pushes are promising. Also there may be too many of them. Perhaps same holds for captures in some positions.
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: LMR problems

Post by Daniel Anulliero »

Henk wrote:Please contact moderators instead of using word troll, trolling etc. It's their decision to block my account.
Very intelligent answer , "kom dab" :lol:
Roger ? Are you here?
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: LMR problems

Post by hgm »

Henk wrote:I don't understand that all Pawn pushes are promising.
A Pawn might be a passer, and pushing it many times in a row might lead to promotion. If you would reduce each of these pushes, you would have to search very deep before you would discover that.

I guess normally you would only do that for passers. But Fairy-Max cannot recognize passers.
Robert Pope
Posts: 558
Joined: Sat Mar 25, 2006 8:27 pm

Re: LMR problems

Post by Robert Pope »

hgm wrote:
Henk wrote:I don't understand that all Pawn pushes are promising.
A Pawn might be a passer, and pushing it many times in a row might lead to promotion. If you would reduce each of these pushes, you would have to search very deep before you would discover that.

I guess normally you would only do that for passers. But Fairy-Max cannot recognize passers.
This is something I hadn't considered. I'll have to see if that makes a difference.

Like Henk (:shock:), I also have had no luck getting improvements from LMR. I tried half a dozen different variations, and every one was a big loser, so I took the code back out. Unlike Henk, I tested each patch with at least 1000 games. But I haven't been able to figure out where I am going wrong, since everyone else seems to do so well with it.
Stan Arts
Posts: 179
Joined: Fri Feb 14, 2014 10:53 pm
Location: the Netherlands

Re: LMR problems

Post by Stan Arts »

Ferdy wrote: 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.
I notice this too. The more selective with it's late move stuff the more the program starts to try and "force" play according to it's evaluation. Searching lines that it likes or make sense to it rather deeply but developing blind spots to stuff that seems unlikely to it.
(Even without any sorting or evaluation factored into reductions. It makes sense because good moves that come up (hash, killers etc.) are evaluation driven anyway.)

What I like about that is that it has some sort of human-like quality to it. ..relative to full width brute force anyway.
F. Bluemers
Posts: 868
Joined: Thu Mar 09, 2006 11:21 pm
Location: Nederland

Re: LMR problems

Post by F. Bluemers »

Robert Pope wrote:
hgm wrote:
Henk wrote:I don't understand that all Pawn pushes are promising.
A Pawn might be a passer, and pushing it many times in a row might lead to promotion. If you would reduce each of these pushes, you would have to search very deep before you would discover that.

I guess normally you would only do that for passers. But Fairy-Max cannot recognize passers.
This is something I hadn't considered. I'll have to see if that makes a difference.

Like Henk (:shock:), I also have had no luck getting improvements from LMR. I tried half a dozen different variations, and every one was a big loser, so I took the code back out. Unlike Henk, I tested each patch with at least 1000 games. But I haven't been able to figure out where I am going wrong, since everyone else seems to do so well with it.
You can also be too carefull.
For a reduction of 1 you want lmr to kick in as fast as possible (after maybe two,three or four moves are searched),no exception there except when alpha is -INF or beta is INF.
If its hard to measure you could try disabling nullmove ,so that any overlap is gone.
Cardoso
Posts: 362
Joined: Thu Mar 16, 2006 7:39 pm
Location: Portugal
Full name: Alvaro Cardoso

Re: LMR problems

Post by Cardoso »

Very interesting point from Ferdinand and you Stan.
It hadn't occurred to me.
I really must pay more attention to my evaluation function.

regards,
Alvaro
Karlo Bala
Posts: 373
Joined: Wed Mar 22, 2006 10:17 am
Location: Novi Sad, Serbia
Full name: Karlo Balla

Re: LMR problems

Post by Karlo Bala »

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.
Well, LMR should work even on unsorted move list. LMR is more about statistic and probability than about particular moves. There are many posts from Stockfish team in which authors explain the idea.
Best Regards,
Karlo Balla Jr.
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: LMR problems

Post by Henk »

If you want to make your engine really slow then you should spend much CPU time on move ordering. I remember evaluating moves at MAXDEPTH on MAXDEPTH - N to get a good value for move ordering (ouch). Best value is N = MAXDEPTH and even that made it slower. So move ordering should be cheap.
Uri Blass
Posts: 10282
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: LMR problems

Post by Uri Blass »

hgm wrote:
Henk wrote:I don't understand that all Pawn pushes are promising.
A Pawn might be a passer, and pushing it many times in a row might lead to promotion. If you would reduce each of these pushes, you would have to search very deep before you would discover that.

I guess normally you would only do that for passers. But Fairy-Max cannot recognize passers.
Maybe you can try only not reducing pawn pushes of pawns that are not in the second or third rank.