Is LMR safe within NULL move reduction

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Is LMR safe within NULL move reduction

Post by Henk »

Almost every chess program uses null move checks or reductions which take a lot of cpu time. Is it safe to apply LMR within these null moves checks or will the variant be reduced too much.
Uri Blass
Posts: 10296
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Is LMR safe within NULL move reduction

Post by Uri Blass »

I see nothing that is not safe with LMR

unlike null move pruning that may cause the program never to find the best move in cases of zugzwang LMR is safe in the meaning that you can be sure that finding the best move is only a question of time.
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Is LMR safe within NULL move reduction

Post by tpetzke »

No it is not safe, because whole LMR is not safe. You might end up missing a good move and this might cost you the game.

If you restrict yourself to safe optimization methods you have to stick to plain alpha beta and a very limited (= safe) form of futility pruning.

Then you can be sure that within the search horizon of your program you want miss a good move.

Thomas...
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Is LMR safe within NULL move reduction

Post by Henk »

You mention plain alfa beta and not PVS or negascout. Is PVS not safe either ?
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Is LMR safe within NULL move reduction

Post by tpetzke »

unlike null move pruning that may cause the program never to find the best move in cases of zugzwang LMR is safe in the meaning that you can be sure that finding the best move is only a question of time.
Yes, in a world where an engine can search as long as it wants you are right. In this world engines play with a time control. Therefore the time needed to find out that a reduction of a move was wrong might not be there. This makes it unsafe.

Thomas...
Uri Blass
Posts: 10296
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Is LMR safe within NULL move reduction

Post by Uri Blass »

tpetzke wrote:No it is not safe, because whole LMR is not safe. You might end up missing a good move and this might cost you the game.

If you restrict yourself to safe optimization methods you have to stick to plain alpha beta and a very limited (= safe) form of futility pruning.

Then you can be sure that within the search horizon of your program you want miss a good move.

Thomas...
I think that it is mainly the opposite.
You may miss a good move by not using LMR because with the same time you do not get depth that is big enough and it can cost you the game.


I am against using the words "not safe" here because it may confuse the reader(I consider safe to be a positive word and I consider "not safe" to be negative words).

A reader who know nothing about computer chess and read that LMR is not safe may understand wrongly that LMR reduce the playing strength of chess programs.
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Is LMR safe within NULL move reduction

Post by Henk »

I don't like the idea that my chess program is winning a game because of lots of luck. Say in forty moves my chess program did not exclude the best move and that's why it won. Looks like poker to me.
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Is LMR safe within NULL move reduction

Post by tpetzke »

A reader that does know nothing about computer chess is probably not browsing the technical section of a chess programming forum.

You can reduce the playing strength of your program with LMR and you also can increase it. If you start using LMR you might get a different move then you would without it. If done correctly often (not always) the move you get is better.

If you are worried about the "not always" and if you read his "Is LMR sound" thread he seems very worried about that, then you should not use it.

Thomas...
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Is LMR safe within NULL move reduction

Post by tpetzke »

PVS is safe, at least as safe as you can get here.

Even the transposition table where you just store results of previous searches might lead to a different best move. So some randomness is always present.

Thomas
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Is LMR safe within NULL move reduction

Post by tpetzke »

No it is not Poker, it is actually similar how Humans play chess. In a given position a human doesn't spend equal efforts on all moves. He picks some that he thinks about a lot and some others he discards quickly.

Sometimes he discards a move he should have thought about a bit longer

Thomas...