LMP

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
flok
Posts: 481
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

LMP

Post by flok »

Hi,

What is LMP and how does it work/is it implemented?
LMP, late move pruning not reduction.
I see mentions of it here and there but it is not described on the wiki.
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: LMP

Post by JVMerlino »

Late Move Pruning can just as easily be thought of as "Maximally Aggressive Late Move Reduction". Instead of, as in LMR, reducing the remaining depth of a move by some amount depending on how late it is in the move order, you simply reduce the remaining depth to 0, no matter what the remaining depth is. I'm not 100% sure, but I believe some implementations drop straight to q-search at this point, while others abandon the line altogether.

The factors that go into the decision to prune a move are quite varied among engines that implement LMP. Since LMP is potentially more dangerous than LMR, it should be thoroughly tested.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: LMP

Post by Gerd Isenberg »

flok wrote: Tue Jul 09, 2019 5:27 pm Hi,

What is LMP and how does it work/is it implemented?
LMP, late move pruning not reduction.
I see mentions of it here and there but it is not described on the wiki.
Mentioned on the Futility Pruning page as Move Count Based Pruning aka Late Move Pruning (LMP) with reference post by Tom King.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: LMP

Post by Henk »

If you already have a good move you can prune everything
So need not be dangereuses
Of course iT failed in skipper engine
Probably because search narrowed too Much

Man this phone scrumbling my message
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: LMP

Post by Dann Corbit »

Henk wrote: Tue Jul 09, 2019 9:56 pm If you already have a good move you can prune everything
So need not be dangereuses
Of course iT failed in skipper engine
Probably because search narrowed too Much

Man this phone scrumbling my message
Caveat:
From:
https://en.wikiquote.org/wiki/Emanuel_L ... ite_note-2

"t is necessary always to bear in mind these prudential rules, viz.: having a good move, to seek for a better." Dominico Ercole del Rio, The Incomparable Game of Chess, trans. J.S. Bingham (London 1820), 35-36. Note Bingham incorrectly credits Ercole del Rio with work that was authored by Domenico Lorenzo Ponziani
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: LMP

Post by Henk »

Assuming infinite budget

I score low on perfectionism so no need to discussie with me
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: LMP

Post by Dann Corbit »

Henk wrote: Tue Jul 09, 2019 10:21 pm Assuming infinite budget

I score low on perfectionism so no need to discussie with me
As soon as we move beyond alpha-beta in pruning, perfection has gone out the window.
Null move pruning is unsound. But darned if it doesn't work.
It was Rybka that invented the "drop straight into qsearch idea" and we must admit, it worked pretty well, especially at the time.
I remember Anthony Cozzie being somewhat astonished by the technique.

It is a good idea to prune a lot. The best engines have a branching factor below 2.
But we should not prune too much either.
Naturally, it's a delicate balance. Eloquently described for another game by Kenny Rogers:

"Every gambler knows
The secret to survivin'
Is knowin' what to throw away
And knowin' what to keep"
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
AndrewGrant
Posts: 1750
Joined: Tue Apr 19, 2016 6:08 am
Location: U.S.A
Full name: Andrew Grant

Re: LMP

Post by AndrewGrant »

flok wrote: Tue Jul 09, 2019 5:27 pm Hi,

What is LMP and how does it work/is it implemented?
LMP, late move pruning not reduction.
I see mentions of it here and there but it is not described on the wiki.
For Ethereal ...

Code: Select all

// Step 12B. Late Move Pruning / Move Count Pruning. If we have
// tried many quiets in this position already, and we don't expect
// anything from this move, we can skip all the remaining quiets
if (   depth <= LateMovePruningDepth
    && quiets >= LateMovePruningCounts[improving][depth])
    skipQuiets = 1;

Code: Select all

static const int LateMovePruningDepth = 8;
static const int LateMovePruningCounts[2][9] = {
    {  0,  3,  4,  6, 10, 14, 19, 25, 31},
    {  0,  5,  7, 11, 17, 26, 36, 48, 63},
};
#WeAreAllDraude #JusticeForDraude #RememberDraude #LeptirBigUltra
"Those who can't do, clone instead" - Eduard ( A real life friend, not this forum's Eduard )
chrisw
Posts: 4313
Joined: Tue Apr 03, 2012 4:28 pm

Re: LMP

Post by chrisw »

Dann Corbit wrote: Tue Jul 09, 2019 10:32 pm
Henk wrote: Tue Jul 09, 2019 10:21 pm Assuming infinite budget

I score low on perfectionism so no need to discussie with me
As soon as we move beyond alpha-beta in pruning, perfection has gone out the window.
There never was any perfection, since the default is to prune at the horizon (depth).
Pruning sacrifices some of the (otherwise full) width for more depth. Perfection is unattainable but trading width for depth appears to be the way to minimise imperfections. Maybe.

Null move pruning is unsound. But darned if it doesn't work.
stopping the search by running out of time is unsound too.

It was Rybka that invented the "drop straight into qsearch idea" and we must admit, it worked pretty well, especially at the time.
I remember Anthony Cozzie being somewhat astonished by the technique.

It is a good idea to prune a lot. The best engines have a branching factor below 2.
But we should not prune too much either.
Naturally, it's a delicate balance. Eloquently described for another game by Kenny Rogers:

"Every gambler knows
The secret to survivin'
Is knowin' what to throw away
And knowin' what to keep"