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

Re: LMR problems

Post by Henk » Mon May 23, 2016 9:09 am

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

Re: LMR problems

Post by Daniel Anulliero » Mon May 23, 2016 9:56 am

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: 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 12:23 pm

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: 523
Joined: Sat Mar 25, 2006 7:27 pm

Re: LMR problems

Post by Robert Pope » Mon May 23, 2016 1:55 pm

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 9:53 pm
Location: the Netherlands

Re: LMR problems

Post by Stan Arts » Mon May 23, 2016 3:05 pm

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

Re: LMR problems

Post by F. Bluemers » Mon May 23, 2016 3:06 pm

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: 317
Joined: Thu Mar 16, 2006 6:39 pm
Location: Portugal
Full name: Alvaro Cardoso
Contact:

Re: LMR problems

Post by Cardoso » Mon May 23, 2016 3:50 pm

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: 336
Joined: Wed Mar 22, 2006 9:17 am
Location: Novi Sad, Serbia

Re: LMR problems

Post by Karlo Bala » Mon May 23, 2016 3:59 pm

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

Re: LMR problems

Post by Henk » Mon May 23, 2016 4:56 pm

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: 8940
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: LMR problems

Post by Uri Blass » Mon May 23, 2016 5:02 pm

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.

Post Reply