LMR testing

Discussion of chess software programming and technical issues.

Moderator: Ras

gaard
Posts: 463
Joined: Mon Jun 07, 2010 3:13 am
Location: Holland, MI
Full name: Martin W

LMR testing

Post by gaard »

Testing LMR chhanges at 5"+0.05" is a very different beast versus testing at 60"+0.6". What is the longest time control you find useful to validate said changes? I usually have to increment time by 30x but there must be something more efficient, or some alternate method?

To add some context, I'm referring to the usual LMR formula. log2(min(moveNum, 64)) * log2(min(depth, 64)) * X1 + X2
User avatar
Steve Maughan
Posts: 1276
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: LMR testing

Post by Steve Maughan »

Hi Martin,

Interesting — I had thought basically any time control would work. I'll do some digging.

As for the "usual LMR formula", do you know which engines us this formula? Does Stockfish use it?

— Steve
http://www.chessprogramming.net - Juggernaut & Maverick Chess Engine
Ciekce
Posts: 193
Joined: Sun Oct 30, 2022 5:26 pm
Full name: Conor Anstey

Re: LMR testing

Post by Ciekce »

Steve Maughan wrote: Fri Nov 17, 2023 9:14 pm As for the "usual LMR formula", do you know which engines us this formula? Does Stockfish use it?
stockfish has a variation on it, it's almost a standard now - you can see it in SP (with unclamped moves and depth) here https://github.com/Ciekce/Stormphrax/bl ... le.cpp#L37

pick any strong engine off CCRL and chances are it'll use that formula or something very similar
gaard
Posts: 463
Joined: Mon Jun 07, 2010 3:13 am
Location: Holland, MI
Full name: Martin W

Re: LMR testing

Post by gaard »

Steve Maughan wrote: Fri Nov 17, 2023 9:14 pm Hi Martin,

Interesting — I had thought basically any time control would work. I'll do some digging.

As for the "usual LMR formula", do you know which engines us this formula? Does Stockfish use it?

— Steve
Berzerk: log(d) * log(m) * x + y
Demolito: log(d) * x + log(m) * y
Senpai: log2(d) * log2(m) * x
Ethereal: log(d) * log(m) * x + y

There is some variation, but more-or-less, the formulas are near identical
User avatar
Steve Maughan
Posts: 1276
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: LMR testing

Post by Steve Maughan »

That's great! Thanks! I have come across this formula but didn't appreciate how widespread it was being used.

— Steve
http://www.chessprogramming.net - Juggernaut & Maverick Chess Engine
gaard
Posts: 463
Joined: Mon Jun 07, 2010 3:13 am
Location: Holland, MI
Full name: Martin W

Re: LMR testing

Post by gaard »

Steve Maughan wrote: Fri Nov 17, 2023 9:14 pm Hi Martin,

Interesting — I had thought basically any time control would work. I'll do some digging.

As for the "usual LMR formula", do you know which engines us this formula? Does Stockfish use it?

— Steve
Changes that can significantly affect the tree or branching factor seem to be the most sensitive to time control in my experience. They could yield more Elo at shorter tcs, but turn negative at longer, and vice-versa. Usually my slowest tc testing is 60"+0.6", only 6x slower than my fastest. Maybe I need a greater breadth?
Bart Weststrate
Posts: 15
Joined: Fri Mar 18, 2016 3:34 pm

Re: LMR testing

Post by Bart Weststrate »

gaard wrote: Fri Nov 17, 2023 8:10 pm Testing LMR chhanges at 5"+0.05" is a very different beast versus testing at 60"+0.6". What is the longest time control you find useful to validate said changes? I usually have to increment time by 30x but there must be something more efficient, or some alternate method?

To add some context, I'm referring to the usual LMR formula. log2(min(moveNum, 64)) * log2(min(depth, 64)) * X1 + X2
What is X1 and X2? Maybe a stupid question... :(
Ciekce
Posts: 193
Joined: Sun Oct 30, 2022 5:26 pm
Full name: Conor Anstey

Re: LMR testing

Post by Ciekce »

Bart Weststrate wrote: Mon Nov 20, 2023 7:38 pm
gaard wrote: Fri Nov 17, 2023 8:10 pm Testing LMR chhanges at 5"+0.05" is a very different beast versus testing at 60"+0.6". What is the longest time control you find useful to validate said changes? I usually have to increment time by 30x but there must be something more efficient, or some alternate method?

To add some context, I'm referring to the usual LMR formula. log2(min(moveNum, 64)) * log2(min(depth, 64)) * X1 + X2
What is X1 and X2? Maybe a stupid question... :(
Tunable params. X1 = 1/2.36 and X2 = 0.77 in my engine
Bart Weststrate
Posts: 15
Joined: Fri Mar 18, 2016 3:34 pm

Re: LMR testing

Post by Bart Weststrate »

Thanks.
Frank Quisinsky
Posts: 6896
Joined: Wed Nov 18, 2009 7:16 pm
Location: Gutweiler, Germany
Full name: Frank Quisinsky

Re: LMR testing

Post by Frank Quisinsky »

BTW:
Wow ... Bart Westrate is here!
Jan Louwman gave often the information: Clearly the most talented chess programmer (middle of the 90er).
Kallisto 1.83 was most aggressive ... produced the most short wins!
OK, newer versions are stronger and the DOS graphic from Kallisto was a mega-event.

Bart, today I have excactly the same fun with your Kallisto II as in the time you gave me the program in Leiden.

Send shortly my regards!

Best
Frank

Maybe you have interest to create an UCI engines for us!
Sure, an event!